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