mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-09-23 12:33:44 +08:00
Update SqlExecuteCount
This commit is contained in:
@@ -46,7 +46,7 @@ namespace SqlSugar
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Add, delete and modify: the number of affected items;
|
/// Add, delete and modify: the number of affected items;
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public int SqlExecuteCount { get; private set; } = 0;
|
public int SqlExecuteCount { get; protected set; } = 0;
|
||||||
public StackTraceInfo SqlStackTrace { get { return UtilMethods.GetStackTrace(); } }
|
public StackTraceInfo SqlStackTrace { get { return UtilMethods.GetStackTrace(); } }
|
||||||
public bool IsDisableMasterSlaveSeparation { get; set; }
|
public bool IsDisableMasterSlaveSeparation { get; set; }
|
||||||
internal DateTime BeforeTime = DateTime.MinValue;
|
internal DateTime BeforeTime = DateTime.MinValue;
|
||||||
|
@@ -218,6 +218,7 @@ namespace SqlSugar
|
|||||||
count = await sqlCommand.ExecuteNonQueryAsync(this.CancellationToken.Value);
|
count = await sqlCommand.ExecuteNonQueryAsync(this.CancellationToken.Value);
|
||||||
if (this.IsClearParameters)
|
if (this.IsClearParameters)
|
||||||
sqlCommand.Parameters.Clear();
|
sqlCommand.Parameters.Clear();
|
||||||
|
SqlExecuteCount = count;
|
||||||
ExecuteAfter(sql, parameters);
|
ExecuteAfter(sql, parameters);
|
||||||
sqlCommand.Dispose();
|
sqlCommand.Dispose();
|
||||||
return count;
|
return count;
|
||||||
|
Reference in New Issue
Block a user