From 9f9b30704905060671089cca733d1e3953f3f402 Mon Sep 17 00:00:00 2001 From: "610262374@qq.com" <610262374@qq.com> Date: Mon, 17 Dec 2018 16:32:21 +0800 Subject: [PATCH] Update .net --- Src/Asp.Net/SqlSugar/Infrastructure/ContextMethods.cs | 1 + Src/Asp.Net/SqlSugar/Infrastructure/InstanceFactory.cs | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/Src/Asp.Net/SqlSugar/Infrastructure/ContextMethods.cs b/Src/Asp.Net/SqlSugar/Infrastructure/ContextMethods.cs index 9d362b713..546785882 100644 --- a/Src/Asp.Net/SqlSugar/Infrastructure/ContextMethods.cs +++ b/Src/Asp.Net/SqlSugar/Infrastructure/ContextMethods.cs @@ -334,6 +334,7 @@ namespace SqlSugar public void RemoveCacheAll() { ReflectionInoHelper.RemoveAllCache(); + InstanceFactory.RemoveCache(); } public void RemoveCacheAll() diff --git a/Src/Asp.Net/SqlSugar/Infrastructure/InstanceFactory.cs b/Src/Asp.Net/SqlSugar/Infrastructure/InstanceFactory.cs index edec2ff9f..3b7b4eb76 100644 --- a/Src/Asp.Net/SqlSugar/Infrastructure/InstanceFactory.cs +++ b/Src/Asp.Net/SqlSugar/Infrastructure/InstanceFactory.cs @@ -11,6 +11,12 @@ namespace SqlSugar static Assembly assembly = Assembly.Load(UtilConstants.AssemblyName); static Dictionary typeCache = new Dictionary(); + + public static void RemoveCache() + { + typeCache = new Dictionary(); + } + #region Queryable public static ISugarQueryable GetQueryable(ConnectionConfig currentConnectionConfig) {