mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-09-19 01:58:13 +08:00
Update codefirst
This commit is contained in:
@@ -346,9 +346,12 @@ namespace SqlSugar
|
||||
try
|
||||
{
|
||||
this.BeginTran();
|
||||
var oldSave = this.Context.CurrentConnectionConfig.SlaveConnectionConfigs;
|
||||
this.Context.CurrentConnectionConfig.SlaveConnectionConfigs = null;
|
||||
if (action != null)
|
||||
action();
|
||||
this.CommitTran();
|
||||
this.Context.CurrentConnectionConfig.SlaveConnectionConfigs = oldSave;
|
||||
result.Data = result.IsSuccess = true;
|
||||
}
|
||||
catch (Exception ex)
|
||||
|
@@ -207,6 +207,7 @@ namespace SqlSugar
|
||||
var tempTableName = "TempDiff" + DateTime.Now.ToString("yyMMssHHmmssfff");
|
||||
var oldTableName = this.Context.EntityMaintenance.GetEntityInfo(type).DbTableName;
|
||||
var db = new SqlSugarProvider(UtilMethods.CopyConfig(this.Context.CurrentConnectionConfig));
|
||||
db.CurrentConnectionConfig.SlaveConnectionConfigs = null;
|
||||
db.CurrentConnectionConfig.ConfigureExternalServices=UtilMethods.IsNullReturnNew(db.CurrentConnectionConfig.ConfigureExternalServices);
|
||||
db.CurrentConnectionConfig.ConfigureExternalServices.EntityNameService += (x, p) =>
|
||||
{
|
||||
|
Reference in New Issue
Block a user