An asynchronous approach that refines previous functionality

This commit is contained in:
sunkaixuan
2023-06-19 19:11:49 +08:00
parent 458e5fea7a
commit 67c1cc3ea9
2 changed files with 2 additions and 0 deletions

View File

@@ -584,6 +584,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();
this.SqlExecuteCount = count;
ExecuteAfter(sql, parameters); ExecuteAfter(sql, parameters);
sqlCommand.Dispose(); sqlCommand.Dispose();
return count; return count;

View File

@@ -584,6 +584,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();
this.SqlExecuteCount = count;
ExecuteAfter(sql, parameters); ExecuteAfter(sql, parameters);
sqlCommand.Dispose(); sqlCommand.Dispose();
return count; return count;