修复低版本兼容性

This commit is contained in:
hyzx86
2023-09-27 01:22:37 +08:00
parent be5b2cc044
commit a278578daf
2 changed files with 14 additions and 2 deletions

View File

@ -23,7 +23,7 @@ namespace FreeSql.Internal
/// 用于解决多实例情况下的静态集合缓存问题
/// </summary>
public static Func<ConcurrentDictionary<DataType, ConcurrentDictionary<Type, TableInfo>>> ChacheTableEntityFactory = null;
private static ConcurrentDictionary<DataType, ConcurrentDictionary<Type, TableInfo>> __cacheGetTableByEntity;
private static ConcurrentDictionary<DataType, ConcurrentDictionary<Type, TableInfo>> __cacheGetTableByEntity = new ConcurrentDictionary<DataType, ConcurrentDictionary<Type, TableInfo>>();
public static ConcurrentDictionary<DataType, ConcurrentDictionary<Type, TableInfo>> _cacheGetTableByEntity
{
get
@ -32,7 +32,6 @@ namespace FreeSql.Internal
{
return ChacheTableEntityFactory.Invoke();
}
__cacheGetTableByEntity ??= new ConcurrentDictionary<DataType, ConcurrentDictionary<Type, TableInfo>>();
return __cacheGetTableByEntity;
}
}