fix init table
This commit is contained in:
@@ -139,12 +139,12 @@ public class SqlSugarPack : BaseAppPack
|
||||
|
||||
public override void Configure(IApplicationBuilder app, IWebHostEnvironment env)
|
||||
{
|
||||
using var scope = app.ApplicationServices.CreateScope();
|
||||
var db = scope.ServiceProvider.GetService<IDbContext>();
|
||||
|
||||
db.Client.DbMaintenance.CreateDatabase();
|
||||
db.Client.CodeFirst.InitTables<LocalBalanceRecordEntity, LocalGainfoEntity, LocalGainfoMealEntity, LocalBusinessPlaceEntity>();
|
||||
db.Client.CodeFirst.InitTables<LocalBusinessShiftEntity, LocalDeviceRegistryEntity, LocalDeviceEntity, LocalBusinessPlaceShiftRelationshipEntity, LocalBusinessShiftMealRelationshipEntity>();
|
||||
db.Client.CodeFirst.InitTables<LocalCanteenSettingEntity, LocalDepartmentEntity>();
|
||||
// using var scope = app.ApplicationServices.CreateScope();
|
||||
// var db = scope.ServiceProvider.GetService<IDbContext>();
|
||||
//
|
||||
// db.Client.DbMaintenance.CreateDatabase();
|
||||
// db.Client.CodeFirst.InitTables<LocalBalanceRecordEntity, LocalGainfoEntity, LocalGainfoMealEntity, LocalBusinessPlaceEntity>();
|
||||
// db.Client.CodeFirst.InitTables<LocalBusinessShiftEntity, LocalDeviceRegistryEntity, LocalDeviceEntity, LocalBusinessPlaceShiftRelationshipEntity, LocalBusinessShiftMealRelationshipEntity>();
|
||||
// db.Client.CodeFirst.InitTables<LocalCanteenSettingEntity, LocalDepartmentEntity>();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user