mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-07-17 01:46:18 +08:00
Update BulkUpdate
This commit is contained in:
parent
b8645685fa
commit
b9b6fb7f8e
@ -307,6 +307,8 @@ namespace SqlSugar
|
||||
Check.Exception(updateColumns == null || updateColumns.Count() == 0, "set columns count=0");
|
||||
var isAuto = this.context.CurrentConnectionConfig.IsAutoCloseConnection;
|
||||
this.context.CurrentConnectionConfig.IsAutoCloseConnection = false;
|
||||
var old = this.context.Ado.IsDisableMasterSlaveSeparation;
|
||||
this.context.Ado.IsDisableMasterSlaveSeparation = true;
|
||||
DataTable dt = ToDdateTable(datas);
|
||||
IFastBuilder buider = GetBuider();
|
||||
ActionIgnoreColums(whereColumns, updateColumns, dt, buider.IsActionUpdateColumns);
|
||||
@ -320,6 +322,7 @@ namespace SqlSugar
|
||||
this.context.DbMaintenance.DropTable(dt.TableName);
|
||||
}
|
||||
this.context.CurrentConnectionConfig.IsAutoCloseConnection = isAuto;
|
||||
this.context.Ado.IsDisableMasterSlaveSeparation = old;
|
||||
buider.CloseDb();
|
||||
End(datas, false);
|
||||
return result;
|
||||
|
Loading…
Reference in New Issue
Block a user