Browse Source

Update Tran

pull/29/head
sunkaixuan 2 years ago
parent
commit
f7293a5401
  1. 6
      Src/Asp.NetCore2/SqlSugar/Abstract/AdoProvider/AdoProvider.cs

6
Src/Asp.NetCore2/SqlSugar/Abstract/AdoProvider/AdoProvider.cs

@ -303,10 +303,10 @@ namespace SqlSugar
var result = new DbResult<bool>();
try
{
this.BeginTran();
await this.BeginTranAsync();
if (action != null)
await action();
this.CommitTran();
await this.CommitTranAsync();
result.Data = result.IsSuccess = true;
}
catch (Exception ex)
@ -314,7 +314,7 @@ namespace SqlSugar
result.ErrorException = ex;
result.ErrorMessage = ex.Message;
result.IsSuccess = false;
this.RollbackTran();
await this.RollbackTranAsync();
if (errorCallBack != null)
{
errorCallBack(ex);

Loading…
Cancel
Save