为多实例 不同表名规则情况下开放缓存机制,可使用MemoryCache等功能替换为实例缓存

避免全局静态缓存表名称无法替换
This commit is contained in:
hyzx86 2023-09-26 22:54:15 +08:00
parent 7926429393
commit 922f645249

View File

@ -19,8 +19,10 @@ namespace FreeSql.Internal
{
public class Utils
{
static ConcurrentDictionary<DataType, ConcurrentDictionary<Type, TableInfo>> _cacheGetTableByEntity = new ConcurrentDictionary<DataType, ConcurrentDictionary<Type, TableInfo>>();
public static ConcurrentDictionary<DataType, ConcurrentDictionary<Type, TableInfo>> _cacheGetTableByEntity
{
get; set;
} = new ConcurrentDictionary<DataType, ConcurrentDictionary<Type, TableInfo>>();
internal static void RemoveTableByEntity(Type entity, CommonUtils common)
{
if (entity.IsAnonymousType() ||