mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-07-31 15:56:25 +08:00
Synchronization code
This commit is contained in:
parent
bc98ab8eb3
commit
036e82fbf0
@ -190,16 +190,17 @@ namespace SqlSugar
|
||||
}
|
||||
public IUpdateable<T> 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<T> EnableDiffLogEventIF(bool isEnableDiffLog, object businessData = null)
|
||||
|
Loading…
Reference in New Issue
Block a user