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