made it migrate

This commit is contained in:
Damien Ostler 2024-02-10 01:53:38 -05:00
parent 560be3ce13
commit 7ea1897fb4

View File

@ -148,9 +148,9 @@ var app = builder.Build();
var serviceScope = app.Services
.GetRequiredService<IServiceScopeFactory>()
.CreateScope();
using var context = serviceScope.ServiceProvider
.GetService<ApplicationDbContext>();
context.Database.Migrate();
using (var context = serviceScope.ServiceProvider.GetService<ApplicationDbContext>()){
context.Database.Migrate();
}
app.UseSwagger();
app.UseSwaggerUI(settings =>
{