diff --git a/Src/Asp.NetCore2/SqlSugar/SqlSugarClient.cs b/Src/Asp.NetCore2/SqlSugar/SqlSugarClient.cs index 4bcaf2207..9ca204ade 100644 --- a/Src/Asp.NetCore2/SqlSugar/SqlSugarClient.cs +++ b/Src/Asp.NetCore2/SqlSugar/SqlSugarClient.cs @@ -925,6 +925,10 @@ namespace SqlSugar db.Context.Ado.BeginTran(); } db.Context.Root = this; + if (db.Context.MappingTables == null) + { + db.Context.MappingTables = new MappingTableList(); + } return db.Context; }