fix 补充注释,接口兼容设备

This commit is contained in:
2024-01-03 17:34:19 +08:00
parent ebffe59360
commit bcec08d10a
13 changed files with 88 additions and 35 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
}
}