mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-08-20 09:28:53 +08:00
Update CodeFirst
This commit is contained in:
parent
edc83cdaea
commit
f3181c9e2e
@ -64,6 +64,8 @@ namespace SqlSugar
|
|||||||
}
|
}
|
||||||
public virtual void InitTables(Type entityType)
|
public virtual void InitTables(Type entityType)
|
||||||
{
|
{
|
||||||
|
var oldSlave = this.Context.CurrentConnectionConfig.SlaveConnectionConfigs;
|
||||||
|
this.Context.CurrentConnectionConfig.SlaveConnectionConfigs = null;
|
||||||
var splitTableAttribute = entityType.GetCustomAttribute<SplitTableAttribute>();
|
var splitTableAttribute = entityType.GetCustomAttribute<SplitTableAttribute>();
|
||||||
if (splitTableAttribute != null)
|
if (splitTableAttribute != null)
|
||||||
{
|
{
|
||||||
@ -104,6 +106,7 @@ namespace SqlSugar
|
|||||||
|
|
||||||
RestMappingTables(oldTableList);
|
RestMappingTables(oldTableList);
|
||||||
}
|
}
|
||||||
|
this.Context.CurrentConnectionConfig.SlaveConnectionConfigs = oldSlave;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -189,7 +192,7 @@ namespace SqlSugar
|
|||||||
foreach (var type in types)
|
foreach (var type in types)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
GetDifferenceTables(result, type);
|
GetDifferenceTables(result, type);
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user