Restore the previous version

This commit is contained in:
sunkaixuan 2024-03-08 13:48:03 +08:00
parent 6456484479
commit 8656009d6f
2 changed files with 4 additions and 8 deletions

View File

@ -54,7 +54,6 @@ namespace SqlSugar
{
SplitFastest<T> result = new SplitFastest<T>();
result.FastestProvider = this;
result.PageSize = this.Size;
return result;
}
}

View File

@ -12,9 +12,6 @@ namespace SqlSugar
public FastestProvider<T> FastestProvider { get; set; }
public SqlSugarProvider Context { get { return this.FastestProvider.context; } }
public EntityInfo EntityInfo { get { return this.Context.EntityMaintenance.GetEntityInfo<T>(); } }
public int PageSize { get; internal set; }
public int BulkCopy(List<T> datas)
{
List<GroupModel> groupModels;
@ -24,7 +21,7 @@ namespace SqlSugar
{
CreateTable(item.Key);
var addList = item.Select(it => it.Item).ToList();
result += FastestProvider.AS(item.Key).PageSize(this.PageSize).BulkCopy(addList);
result += FastestProvider.AS(item.Key).BulkCopy(addList);
this.Context.MappingTables.Add(EntityInfo.EntityName, EntityInfo.DbTableName);
}
return result;
@ -54,7 +51,7 @@ namespace SqlSugar
{
CreateTable(item.Key);
var addList = item.Select(it => it.Item).ToList();
result += FastestProvider.AS(item.Key).PageSize(this.PageSize).BulkUpdate(addList);
result += FastestProvider.AS(item.Key).BulkUpdate(addList);
this.Context.MappingTables.Add(EntityInfo.EntityName, EntityInfo.DbTableName);
}
return result;
@ -68,7 +65,7 @@ namespace SqlSugar
{
CreateTable(item.Key);
var addList = item.Select(it => it.Item).ToList();
result += await FastestProvider.AS(item.Key).PageSize(this.PageSize).BulkUpdateAsync(addList);
result += await FastestProvider.AS(item.Key).BulkUpdateAsync(addList);
this.Context.MappingTables.Add(EntityInfo.EntityName, EntityInfo.DbTableName);
}
return result;
@ -95,7 +92,7 @@ namespace SqlSugar
foreach (var item in groupModels.GroupBy(it => it.GroupName))
{
var addList = item.Select(it => it.Item).ToList();
result += await FastestProvider.AS(item.Key).PageSize(this.PageSize).BulkUpdateAsync(addList, wherColumns, updateColumns); ;
result += await FastestProvider.AS(item.Key).BulkUpdateAsync(addList, wherColumns, updateColumns); ;
}
return result;
}