diff --git a/Src/Asp.NetCore2/SqlSugar/SpliteTable/SplitTableContext.cs b/Src/Asp.NetCore2/SqlSugar/SpliteTable/SplitTableContext.cs index 8a7a13db7..62753b502 100644 --- a/Src/Asp.NetCore2/SqlSugar/SpliteTable/SplitTableContext.cs +++ b/Src/Asp.NetCore2/SqlSugar/SpliteTable/SplitTableContext.cs @@ -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 GetCustomGetTables() + { + var oldIsEnableLogEvent = this.Context.Ado.IsEnableLogEvent; + this.Context.Ado.IsEnableLogEvent = false; + var tables = StaticConfig.SplitTableGetTablesFunc(); + List 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); diff --git a/Src/Asp.NetCore2/SqlSugar/SqlSugarForCore.nuspec b/Src/Asp.NetCore2/SqlSugar/SqlSugarForCore.nuspec index 164f89bfd..ea305e050 100644 --- a/Src/Asp.NetCore2/SqlSugar/SqlSugarForCore.nuspec +++ b/Src/Asp.NetCore2/SqlSugar/SqlSugarForCore.nuspec @@ -2,7 +2,7 @@ SqlSugarCore - 5.1.4.138 + 5.1.4.139-preview01 sunkaixuan 果糖大数据科技 http://www.apache.org/licenses/LICENSE-2.0.html