Browse Source

Update BulkUpdate

SqlSugar5
sunkaixuan 2 years ago
parent
commit
8f1968d161
  1. 2
      Src/Asp.Net/SqlSugar/Abstract/FastestProvider/FastestProvider.cs

2
Src/Asp.Net/SqlSugar/Abstract/FastestProvider/FastestProvider.cs

@ -85,6 +85,8 @@ namespace SqlSugar
} }
public int BulkUpdate(List<T> datas, string[] whereColumns, string[] updateColumns) public int BulkUpdate(List<T> datas, string[] whereColumns, string[] updateColumns)
{ {
whereColumns = whereColumns.Select(x => this.entityInfo.Columns.First(it => it.PropertyName.EqualCase(x) || it.DbColumnName.EqualCase(x)).DbColumnName).ToArray();
updateColumns = updateColumns.Select(x => this.entityInfo.Columns.First(it => it.PropertyName.EqualCase(x) || it.DbColumnName.EqualCase(x)).DbColumnName).ToArray();
return BulkUpdateAsync(datas,whereColumns,updateColumns).ConfigureAwait(true).GetAwaiter().GetResult(); return BulkUpdateAsync(datas,whereColumns,updateColumns).ConfigureAwait(true).GetAwaiter().GetResult();
} }
public async Task<int> BulkUpdateAsync(List<T> datas,string [] whereColumns,string [] updateColumns) public async Task<int> BulkUpdateAsync(List<T> datas,string [] whereColumns,string [] updateColumns)

Loading…
Cancel
Save