mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-04-24 18:04:52 +08:00
Split table
This commit is contained in:
parent
5eb7ff604a
commit
be67b525fa
@ -35,7 +35,16 @@ namespace SqlSugar
|
||||
}
|
||||
public virtual string GetTableName(ISqlSugarClient db, EntityInfo EntityInfo)
|
||||
{
|
||||
return GetTableName(db, EntityInfo, SplitType.Day);
|
||||
var splitTableAttribute = EntityInfo.Type.GetCustomAttribute<SplitTableAttribute>();
|
||||
if (splitTableAttribute != null)
|
||||
{
|
||||
var type=(splitTableAttribute as SplitTableAttribute).SplitType;
|
||||
return GetTableName(db, EntityInfo, type);
|
||||
}
|
||||
else
|
||||
{
|
||||
return GetTableName(db, EntityInfo, SplitType.Day);
|
||||
}
|
||||
}
|
||||
public virtual string GetTableName(ISqlSugarClient db, EntityInfo EntityInfo, SplitType splitType)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user