|
@@ -105,9 +105,9 @@ namespace WCS.Service
|
|
|
//初始化数据库
|
|
|
SqlSugarHelper.Do(db =>
|
|
|
{
|
|
|
- var _db = db.Connect;
|
|
|
foreach (var connectionString in ServiceHub.DbConnectionStrings!)
|
|
|
{
|
|
|
+ var _db = db.Connect.GetConnectionScope(connectionString.Key);
|
|
|
switch (connectionString.Key)
|
|
|
{
|
|
|
case "WCSDB"://WCS基本数据库
|
|
@@ -135,8 +135,8 @@ namespace WCS.Service
|
|
|
//db.Context(WcsDlog).CodeFirst.InitTables(typeof(WCS_RGV520));
|
|
|
//db.Context(WcsDlog).CodeFirst.InitTables(typeof(WCS_RGV521));
|
|
|
//db.Context(WcsDlog).CodeFirst.InitTables(typeof(WCS_RGV523));
|
|
|
- //db.Context(WcsDlog).CodeFirst.InitTables(typeof(WCS_SRM520));
|
|
|
- //db.Context(WcsDlog).CodeFirst.InitTables(typeof(WCS_SRM521));
|
|
|
+ //_db.CodeFirst.InitTables(typeof(WCS_SRM520));
|
|
|
+ //_db.CodeFirst.InitTables(typeof(WCS_SRM521));
|
|
|
//db.Context(WcsDlog).CodeFirst.InitTables(typeof(WCS_SRM537));
|
|
|
_db.CodeFirst.InitTables(typeof(WCS_Station520));
|
|
|
_db.CodeFirst.InitTables(typeof(WCS_Station521));
|