Split table db.Updateable.IgnoreColums(+3) bug

This commit is contained in:
sunkaixuan 2022-05-15 10:15:53 +08:00
parent 7783e7ea23
commit 1fd7305527

View File

@ -24,7 +24,9 @@ namespace SqlSugar
foreach (var item in groupModels.GroupBy(it => it.GroupName))
{
var addList = item.Select(it => it.Item).ToList();
result += this.Context.Updateable(addList).IgnoreColumns(GetIgnoreColumns()).AS(item.Key).ExecuteCommand();
result += this.Context.Updateable(addList)
.IgnoreColumns(this.updateobj.UpdateBuilder.IsNoUpdateNull, this.updateobj.UpdateBuilder.IsOffIdentity,this.updateobj.UpdateBuilder.IsNoUpdateDefaultValue)
.IgnoreColumns(GetIgnoreColumns()).AS(item.Key).ExecuteCommand();
}
return result;
}
@ -38,7 +40,9 @@ namespace SqlSugar
foreach (var item in groupModels.GroupBy(it => it.GroupName))
{
var addList = item.Select(it => it.Item).ToList();
result += await this.Context.Updateable(addList).IgnoreColumns(GetIgnoreColumns()).AS(item.Key).ExecuteCommandAsync();
result += await this.Context.Updateable(addList)
.IgnoreColumns(this.updateobj.UpdateBuilder.IsNoUpdateNull, this.updateobj.UpdateBuilder.IsOffIdentity, this.updateobj.UpdateBuilder.IsNoUpdateDefaultValue)
.IgnoreColumns(GetIgnoreColumns()).AS(item.Key).ExecuteCommandAsync();
}
return result;
}