From 036e82fbf0f8d0000c805b9666bdca236a8bee1a Mon Sep 17 00:00:00 2001 From: sunkaixuan <610262374@qq.com> Date: Sat, 10 Dec 2022 13:20:38 +0800 Subject: [PATCH] Synchronization code --- .../UpdateProvider/UpdateableProvider.cs | 21 ++++++++++--------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/Src/Asp.NetCore2/SqlSugar/Abstract/UpdateProvider/UpdateableProvider.cs b/Src/Asp.NetCore2/SqlSugar/Abstract/UpdateProvider/UpdateableProvider.cs index 8393ed5f5..4de60e26f 100644 --- a/Src/Asp.NetCore2/SqlSugar/Abstract/UpdateProvider/UpdateableProvider.cs +++ b/Src/Asp.NetCore2/SqlSugar/Abstract/UpdateProvider/UpdateableProvider.cs @@ -190,16 +190,17 @@ namespace SqlSugar } public IUpdateable AS(string tableName) { - if (tableName == null) return this; - var entityName = typeof(T).Name; - IsAs = true; - OldMappingTableList = this.Context.MappingTables; - this.Context.MappingTables = this.Context.Utilities.TranslateCopy(this.Context.MappingTables); - if (this.Context.MappingTables.Any(it => it.EntityName == entityName)) - { - this.Context.MappingTables.Add(this.Context.MappingTables.First(it => it.EntityName == entityName).DbTableName, tableName); - } - this.Context.MappingTables.Add(entityName, tableName); + //if (tableName == null) return this; + //var entityName = typeof(T).Name; + //IsAs = true; + //OldMappingTableList = this.Context.MappingTables; + //this.Context.MappingTables = this.Context.Utilities.TranslateCopy(this.Context.MappingTables); + //if (this.Context.MappingTables.Any(it => it.EntityName == entityName)) + //{ + // this.Context.MappingTables.Add(this.Context.MappingTables.First(it => it.EntityName == entityName).DbTableName, tableName); + //} + //this.Context.MappingTables.Add(entityName, tableName); + this.UpdateBuilder.TableName = tableName; return this; ; } public IUpdateable EnableDiffLogEventIF(bool isEnableDiffLog, object businessData = null)