Update Access bug

This commit is contained in:
sunkaixuan 2022-07-27 13:04:18 +08:00
parent d19717ace5
commit fdc1f3ba87

View File

@ -403,7 +403,7 @@ namespace SqlSugar
private static Restult GetCacheInstance<Restult>(string className, Type[] types)
{
var cacheKey = className + string.Join(",", types.Select(it => it.FullName));
Type type;
Type type=null;
if (typeCache.ContainsKey(cacheKey))
{
type = typeCache[cacheKey];
@ -418,7 +418,11 @@ namespace SqlSugar
}
else
{
type = GetCustomTypeByClass(className + "`" + types.Length).MakeGenericType(types);
var custom = GetCustomTypeByClass(className + "`" + types.Length);
if (custom != null)
{
type = custom.MakeGenericType(types);
}
if (type == null)
{
type = Type.GetType(className + "`" + types.Length, true).MakeGenericType(types);
@ -444,7 +448,11 @@ namespace SqlSugar
}
else
{
type = GetCustomTypeByClass(className + "`" + types.Length).MakeGenericType(types);
var custom = GetCustomTypeByClass(className + "`" + types.Length);
if (custom != null)
{
type = custom.MakeGenericType(types);
}
if (type == null)
{
type = Type.GetType(className + "`" + types.Length, true).MakeGenericType(types);