mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2026-02-27 16:50:33 +08:00
Update split table
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
using System.Reflection;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
@@ -16,6 +17,19 @@ namespace SqlSugar
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void InitTables(Type type)
|
public void InitTables(Type type)
|
||||||
|
{
|
||||||
|
var isSplitEntity = type.GetCustomAttributes<SplitTableAttribute>() != null;
|
||||||
|
if (isSplitEntity)
|
||||||
|
{
|
||||||
|
_InitTables(type);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
this.Context.CodeFirst.InitTables(type);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
private void _InitTables(Type type)
|
||||||
{
|
{
|
||||||
//var oldMapping = this.Context.Utilities.TranslateCopy(this.Context.MappingTables);
|
//var oldMapping = this.Context.Utilities.TranslateCopy(this.Context.MappingTables);
|
||||||
SplitTableContext helper = new SplitTableContext(Context)
|
SplitTableContext helper = new SplitTableContext(Context)
|
||||||
|
|||||||
Reference in New Issue
Block a user