debug - 数据库连不上问题解决

dep_wangsr
SoulStar 2 weeks ago
parent ef1c87e84e
commit fd50736e08

@ -32,14 +32,6 @@ namespace SlnMesnac.Extensions
{
public static class SqlsugarSetup
{
private static string GetCurrentProjectPath
{
get
{
return Environment.CurrentDirectory.Replace(@"\bin\Debug", "");//获取具体路径
}
}
/// <summary>
/// 注册SqlSugar
@ -60,7 +52,7 @@ namespace SlnMesnac.Extensions
{
ConfigId = item.configId,
DbType = (DbType)item.dbType,
ConnectionString = @"DataSource=" + GetCurrentProjectPath + @"\DataBase\SqlSugar4xTest.sqlite",
ConnectionString = item.connStr,
InitKeyType = InitKeyType.Attribute,
IsAutoCloseConnection = true,
};

Loading…
Cancel
Save