test
All checks were successful
Main Build Process / if_merged (pull_request) Has been skipped

This commit is contained in:
2024-09-07 16:45:56 +02:00
parent aa2694585e
commit e6e716de79
10 changed files with 100 additions and 13 deletions

View File

@@ -74,4 +74,11 @@ app.MapRazorComponents<App>()
// Add additional endpoints required by the Identity /Account Razor components.
app.MapAdditionalIdentityEndpoints();
// Appliquer les migrations automatiquement lors du démarrage
using (var scope = app.Services.CreateScope())
{
var dbContext = scope.ServiceProvider.GetRequiredService<ApplicationDbContext>();
dbContext.Database.Migrate(); // Applique les migrations
}
app.Run();