This commit is contained in:
sunkaixuan
2022-02-26 22:19:54 +08:00
parent ca48ee64d2
commit 524637c2d7

View File

@@ -200,12 +200,10 @@ namespace SqlSugar
var result = new DbResult<bool>();
try
{
var isAutoConfig = this.Context.CurrentConnectionConfig.IsAutoCloseConnection;
this.BeginTran();
if (action != null)
action();
this.CommitTran();
this.Context.CurrentConnectionConfig.IsAutoCloseConnection = isAutoConfig;
result.Data = result.IsSuccess = true;
}
catch (Exception ex)