mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-05-15 20:49:31 +08:00
BulkUpdate(DataTable dataTable+2)
This commit is contained in:
parent
b651e44ce5
commit
209ffea3ff
@ -109,6 +109,12 @@ namespace SqlSugar
|
|||||||
Check.ExceptionEasy(this.AsName.IsNullOrEmpty(), "need .AS(tablaeName) ", "需要 .AS(tablaeName) 设置表名");
|
Check.ExceptionEasy(this.AsName.IsNullOrEmpty(), "need .AS(tablaeName) ", "需要 .AS(tablaeName) 设置表名");
|
||||||
return BulkUpdateAsync(this.AsName, dataTable, whereColumns, updateColumns).ConfigureAwait(true).GetAwaiter().GetResult();
|
return BulkUpdateAsync(this.AsName, dataTable, whereColumns, updateColumns).ConfigureAwait(true).GetAwaiter().GetResult();
|
||||||
}
|
}
|
||||||
|
public int BulkUpdate(DataTable dataTable, string[] whereColumns)
|
||||||
|
{
|
||||||
|
string[] updateColumns = dataTable.Columns.Cast<DataColumn>().Select(it => it.ColumnName).Where(it => !whereColumns.Any(z => z.EqualCase(it))).ToArray();
|
||||||
|
Check.ExceptionEasy(this.AsName.IsNullOrEmpty(), "need .AS(tablaeName) ", "需要 .AS(tablaeName) 设置表名");
|
||||||
|
return BulkUpdateAsync(this.AsName, dataTable, whereColumns, updateColumns).ConfigureAwait(true).GetAwaiter().GetResult();
|
||||||
|
}
|
||||||
public async Task<int> BulkUpdateAsync(string tableName, DataTable dataTable, string[] whereColumns, string[] updateColumns)
|
public async Task<int> BulkUpdateAsync(string tableName, DataTable dataTable, string[] whereColumns, string[] updateColumns)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -25,6 +25,7 @@ namespace SqlSugar
|
|||||||
Task<int> BulkUpdateAsync(List<T> datas, string[] whereColumns, string[] updateColumns);
|
Task<int> BulkUpdateAsync(List<T> datas, string[] whereColumns, string[] updateColumns);
|
||||||
int BulkUpdate(string tableName,DataTable dataTable, string[] whereColumns, string[] updateColumns);
|
int BulkUpdate(string tableName,DataTable dataTable, string[] whereColumns, string[] updateColumns);
|
||||||
int BulkUpdate(DataTable dataTable, string[] whereColumns, string[] updateColumns);
|
int BulkUpdate(DataTable dataTable, string[] whereColumns, string[] updateColumns);
|
||||||
|
int BulkUpdate(DataTable dataTable, string[] whereColumns);
|
||||||
Task<int> BulkUpdateAsync(string tableName, DataTable dataTable, string[] whereColumns, string[] updateColumns);
|
Task<int> BulkUpdateAsync(string tableName, DataTable dataTable, string[] whereColumns, string[] updateColumns);
|
||||||
SplitFastest<T> SplitTable();
|
SplitFastest<T> SplitTable();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user