From 8f1968d1619ab03de19f3369f9539dfd70605cea Mon Sep 17 00:00:00 2001 From: sunkaixuan <610262374@qq.com> Date: Mon, 12 Sep 2022 14:02:45 +0800 Subject: [PATCH] Update BulkUpdate --- .../SqlSugar/Abstract/FastestProvider/FastestProvider.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Src/Asp.Net/SqlSugar/Abstract/FastestProvider/FastestProvider.cs b/Src/Asp.Net/SqlSugar/Abstract/FastestProvider/FastestProvider.cs index a7e40f15a..5a86e359e 100644 --- a/Src/Asp.Net/SqlSugar/Abstract/FastestProvider/FastestProvider.cs +++ b/Src/Asp.Net/SqlSugar/Abstract/FastestProvider/FastestProvider.cs @@ -85,6 +85,8 @@ namespace SqlSugar } public int BulkUpdate(List 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(); } public async Task BulkUpdateAsync(List datas,string [] whereColumns,string [] updateColumns)