Browse Source

update custom db

pull/14/head
sunkaixuna 3 years ago
parent
commit
3b4d6ea292
  1. 8
      Src/Asp.Net/SqlSugar/Infrastructure/InstanceFactory.cs

8
Src/Asp.Net/SqlSugar/Infrastructure/InstanceFactory.cs

@ -493,9 +493,13 @@ namespace SqlSugar
return result;
}
private static Type GetCustomTypeByClass(string className)
internal static Type GetCustomTypeByClass(string className)
{
Type type = Assembly.LoadFrom(CustomTypeName+".dll").GetType(className);
var key = "Assembly_"+ CustomTypeName+assembly.GetHashCode();
var newAssembly = new ReflectionInoCacheService().GetOrCreate<Assembly>(key, () => {
return Assembly.LoadFrom(CustomTypeName + ".dll");
});
Type type = newAssembly.GetType(className);
return type;
}
#endregion

Loading…
Cancel
Save