mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-10-15 18:55:07 +08:00
Synchronization code
This commit is contained in:
@@ -60,7 +60,7 @@ namespace SqlSugar
|
||||
{
|
||||
if (StaticConfig.SplitTableGetTablesFunc != null)
|
||||
{
|
||||
return StaticConfig.SplitTableGetTablesFunc();
|
||||
return GetCustomGetTables();
|
||||
}
|
||||
var oldIsEnableLogEvent = this.Context.Ado.IsEnableLogEvent;
|
||||
this.Context.Ado.IsEnableLogEvent = false;
|
||||
@@ -74,6 +74,16 @@ namespace SqlSugar
|
||||
return result;
|
||||
}
|
||||
|
||||
private List<SplitTableInfo> GetCustomGetTables()
|
||||
{
|
||||
var oldIsEnableLogEvent = this.Context.Ado.IsEnableLogEvent;
|
||||
this.Context.Ado.IsEnableLogEvent = false;
|
||||
var tables = StaticConfig.SplitTableGetTablesFunc();
|
||||
List<SplitTableInfo> result = Service.GetAllTables(this.Context, EntityInfo, tables.Select(it=>new DbTableInfo() { Name=it.TableName }).ToList());
|
||||
this.Context.Ado.IsEnableLogEvent = oldIsEnableLogEvent;
|
||||
return result.ToList();
|
||||
}
|
||||
|
||||
public string GetDefaultTableName()
|
||||
{
|
||||
return Service.GetTableName(this.Context,EntityInfo);
|
||||
|
Reference in New Issue
Block a user