mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-05-17 21:49:33 +08:00
Access bug in webform
This commit is contained in:
parent
eaf1ed69b0
commit
80df87d48c
@ -15,7 +15,7 @@ namespace SqlSugar
|
|||||||
public static string CustomDbName = "";
|
public static string CustomDbName = "";
|
||||||
public static string CustomNamespace = "";
|
public static string CustomNamespace = "";
|
||||||
public static bool NoCache = false;
|
public static bool NoCache = false;
|
||||||
|
public static bool IsWebFrom = false;
|
||||||
public static void RemoveCache()
|
public static void RemoveCache()
|
||||||
{
|
{
|
||||||
typeCache = new Dictionary<string, Type>();
|
typeCache = new Dictionary<string, Type>();
|
||||||
@ -550,6 +550,11 @@ namespace SqlSugar
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
if (IsWebFrom)
|
||||||
|
{
|
||||||
|
string newpath = (System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase) + "\\"+CustomDllName + ".dll").Replace("file:\\", "");
|
||||||
|
return Assembly.LoadFrom(newpath);
|
||||||
|
}
|
||||||
return Assembly.LoadFrom(CustomDllName + ".dll");
|
return Assembly.LoadFrom(CustomDllName + ".dll");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user