mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-09-19 10:08:19 +08:00
Update split table
This commit is contained in:
@@ -78,6 +78,7 @@ namespace OrmTest
|
||||
});
|
||||
|
||||
db.Fastest<OrderSpliteTest>().SplitTable().BulkUpdate(db.Queryable<OrderSpliteTest>().SplitTable(it=>it).ToList());
|
||||
db.Fastest<OrderSpliteTest>().SplitTable().BulkUpdate(db.Queryable<OrderSpliteTest>().SplitTable(it => it).ToList(),new string[] { "pk"},new string[] { "name"});
|
||||
Console.WriteLine("#### CodeFirst end ####");
|
||||
}
|
||||
|
||||
|
@@ -116,7 +116,7 @@ namespace SqlSugar
|
||||
this.context.Ado.IsEnableLogEvent = isLog;
|
||||
if (this.context.CurrentConnectionConfig?.AopEvents?.OnLogExecuted != null)
|
||||
{
|
||||
this.context.CurrentConnectionConfig?.AopEvents?.OnLogExecuted($"End {title} name:{entityInfo.DbTableName} ,count: {datas.Count},current time: {DateTime.Now}" , new SugarParameter[] { });
|
||||
this.context.CurrentConnectionConfig?.AopEvents?.OnLogExecuted($"End {title} name:{GetTableName()} ,count: {datas.Count},current time: {DateTime.Now}" , new SugarParameter[] { });
|
||||
}
|
||||
}
|
||||
|
||||
@@ -127,7 +127,7 @@ namespace SqlSugar
|
||||
this.context.Ado.IsEnableLogEvent = false;
|
||||
if (this.context.CurrentConnectionConfig?.AopEvents?.OnLogExecuting != null)
|
||||
{
|
||||
this.context.CurrentConnectionConfig?.AopEvents?.OnLogExecuting($"Begin {title} name:{entityInfo.DbTableName} ,count: {datas.Count},current time: {DateTime.Now} ", new SugarParameter[] { });
|
||||
this.context.CurrentConnectionConfig?.AopEvents?.OnLogExecuting($"Begin {title} name:{GetTableName()} ,count: {datas.Count},current time: {DateTime.Now} ", new SugarParameter[] { });
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
@@ -94,7 +94,7 @@ namespace SqlSugar
|
||||
}
|
||||
else
|
||||
{
|
||||
return queryable.SqlBuilder.GetTranslationTableName(entityInfo.DbTableName);
|
||||
return queryable.SqlBuilder.GetTranslationTableName(this.context.EntityMaintenance.GetTableName<T>());
|
||||
}
|
||||
}
|
||||
private object ValueConverter(EntityColumnInfo columnInfo, object value)
|
||||
|
@@ -21,7 +21,8 @@ namespace SqlSugar
|
||||
{
|
||||
CreateTable(item.Key);
|
||||
var addList = item.Select(it => it.Item).ToList();
|
||||
result += FastestProvider.AS(item.Key).BulkCopy(addList); ;
|
||||
result += FastestProvider.AS(item.Key).BulkCopy(addList);
|
||||
this.Context.MappingTables.Add(EntityInfo.EntityName, EntityInfo.DbTableName);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
@@ -34,7 +35,8 @@ namespace SqlSugar
|
||||
{
|
||||
CreateTable(item.Key);
|
||||
var addList = item.Select(it => it.Item).ToList();
|
||||
result +=await FastestProvider.AS(item.Key).BulkCopyAsync(addList); ;
|
||||
result +=await FastestProvider.AS(item.Key).BulkCopyAsync(addList);
|
||||
this.Context.MappingTables.Add(EntityInfo.EntityName, EntityInfo.DbTableName);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
@@ -49,7 +51,8 @@ namespace SqlSugar
|
||||
{
|
||||
CreateTable(item.Key);
|
||||
var addList = item.Select(it => it.Item).ToList();
|
||||
result += FastestProvider.AS(item.Key).BulkUpdate(addList); ;
|
||||
result += FastestProvider.AS(item.Key).BulkUpdate(addList);
|
||||
this.Context.MappingTables.Add(EntityInfo.EntityName, EntityInfo.DbTableName);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
@@ -62,7 +65,8 @@ namespace SqlSugar
|
||||
{
|
||||
CreateTable(item.Key);
|
||||
var addList = item.Select(it => it.Item).ToList();
|
||||
result += await FastestProvider.AS(item.Key).BulkUpdateAsync(addList); ;
|
||||
result += await FastestProvider.AS(item.Key).BulkUpdateAsync(addList);
|
||||
this.Context.MappingTables.Add(EntityInfo.EntityName, EntityInfo.DbTableName);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
@@ -102,7 +106,6 @@ namespace SqlSugar
|
||||
this.Context.CodeFirst.InitTables<T>();
|
||||
}
|
||||
this.Context.Ado.IsEnableLogEvent = isLog;
|
||||
this.Context.MappingTables.Add(EntityInfo.EntityName, EntityInfo.DbTableName);
|
||||
}
|
||||
|
||||
private void GroupDataList(List<T> datas, out List<GroupModel> groupModels, out int result)
|
||||
|
Reference in New Issue
Block a user