|
|
|
@ -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,
|
|
|
|
|
};
|
|
|
|
|