设备管理模块Entity添加和controller
This commit is contained in:
@@ -74,6 +74,12 @@ 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 Uid, string Pwd)
|
||||
{
|
||||
DbConnectionType = DbType.PostgreSQL;
|
||||
DbConnectionString =
|
||||
$"Host={Server};Port={Port};Database={Database};Username={Uid};Password={Pwd};";
|
||||
}
|
||||
#endregion
|
||||
/// <summary>
|
||||
/// 设置数据库连接字符串(可手动覆盖)
|
||||
|
||||
Reference in New Issue
Block a user