一期项目框架搭建
This commit is contained in:
@@ -74,6 +74,13 @@ namespace ORM
|
||||
string DBPath = Path.Combine(folder, "SQL.db");
|
||||
DbConnectionString =$@"Data Source=(localdb)\MSSQLLocalDB;Initial Catalog={DBPath};Integrated Security=True;";
|
||||
}
|
||||
public static void InitPostgreSQL(string server, int port, string database, string user, string password)
|
||||
{
|
||||
DbConnectionType = DbType.PostgreSQL;
|
||||
|
||||
DbConnectionString =
|
||||
$"Host={server};Port={port};Database={database};Username={user};Password={password};";
|
||||
}
|
||||
#endregion
|
||||
/// <summary>
|
||||
/// 设置数据库连接字符串(可手动覆盖)
|
||||
|
||||
Reference in New Issue
Block a user