feat 设备分组

This commit is contained in:
2023-12-29 10:09:51 +08:00
parent f5c8f659e4
commit 74d8bd7b3f
18 changed files with 259 additions and 19 deletions

View File

@@ -17,11 +17,11 @@ public class SqlSugarPack : BaseAppPack
public override void Configure(IApplicationBuilder app, IWebHostEnvironment env)
{
#if DEBUG
using var scope = app.ApplicationServices.CreateScope();
var db = scope.ServiceProvider.GetService<ISqlSugarClient>();
var tables = App.ActiveTyps.Where(x => x.IsDefined(typeof(SugarTable), false)).ToArray();
db.DbMaintenance.CreateDatabase();
db.CodeFirst.InitTables(tables);
//using var scope = app.ApplicationServices.CreateScope();
//var db = scope.ServiceProvider.GetService<ISqlSugarClient>();
//var tables = App.ActiveTyps.Where(x => x.IsDefined(typeof(SugarTable), false)).ToArray();
//db.DbMaintenance.CreateDatabase();
//db.CodeFirst.InitTables(tables);
#endif
}
}