mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-09-19 18:22:23 +08:00
Optimize the code
This commit is contained in:
@@ -346,12 +346,12 @@ namespace SqlSugar
|
||||
try
|
||||
{
|
||||
this.BeginTran();
|
||||
var oldSave = this.Context.CurrentConnectionConfig.SlaveConnectionConfigs;
|
||||
var oldSlave = this.Context.CurrentConnectionConfig.SlaveConnectionConfigs;
|
||||
this.Context.CurrentConnectionConfig.SlaveConnectionConfigs = null;
|
||||
if (action != null)
|
||||
action();
|
||||
this.CommitTran();
|
||||
this.Context.CurrentConnectionConfig.SlaveConnectionConfigs = oldSave;
|
||||
this.Context.CurrentConnectionConfig.SlaveConnectionConfigs = oldSlave;
|
||||
result.Data = result.IsSuccess = true;
|
||||
}
|
||||
catch (Exception ex)
|
||||
|
Reference in New Issue
Block a user