mirror of
https://github.com/nsnail/FreeSql.git
synced 2025-04-22 02:32:50 +08:00
- 画蛇添下足 #1627
This commit is contained in:
parent
66f7c659ea
commit
18d610cffb
@ -24,17 +24,7 @@ namespace FreeSql.Internal
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public static Func<ConcurrentDictionary<DataType, ConcurrentDictionary<Type, TableInfo>>> ChacheTableEntityFactory = null;
|
public static Func<ConcurrentDictionary<DataType, ConcurrentDictionary<Type, TableInfo>>> ChacheTableEntityFactory = null;
|
||||||
private static ConcurrentDictionary<DataType, ConcurrentDictionary<Type, TableInfo>> __cacheGetTableByEntity = new ConcurrentDictionary<DataType, ConcurrentDictionary<Type, TableInfo>>();
|
private static ConcurrentDictionary<DataType, ConcurrentDictionary<Type, TableInfo>> __cacheGetTableByEntity = new ConcurrentDictionary<DataType, ConcurrentDictionary<Type, TableInfo>>();
|
||||||
public static ConcurrentDictionary<DataType, ConcurrentDictionary<Type, TableInfo>> _cacheGetTableByEntity
|
public static ConcurrentDictionary<DataType, ConcurrentDictionary<Type, TableInfo>> _cacheGetTableByEntity => ChacheTableEntityFactory?.Invoke() ?? __cacheGetTableByEntity;
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
if (ChacheTableEntityFactory != null)
|
|
||||||
{
|
|
||||||
return ChacheTableEntityFactory.Invoke();
|
|
||||||
}
|
|
||||||
return __cacheGetTableByEntity;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
internal static void RemoveTableByEntity(Type entity, CommonUtils common)
|
internal static void RemoveTableByEntity(Type entity, CommonUtils common)
|
||||||
{
|
{
|
||||||
if (entity.IsAnonymousType() ||
|
if (entity.IsAnonymousType() ||
|
||||||
|
Loading…
x
Reference in New Issue
Block a user