diff --git a/GerbilManagerWebAPI/Program.cs b/GerbilManagerWebAPI/Program.cs index e04a6fc..2073496 100644 --- a/GerbilManagerWebAPI/Program.cs +++ b/GerbilManagerWebAPI/Program.cs @@ -23,6 +23,10 @@ if (app.Environment.IsDevelopment()) { app.UseSwagger(); app.UseSwaggerUI(); + + // Aspire provisions an empty database in dev — bring the schema up to date. + using var scope = app.Services.CreateScope(); + scope.ServiceProvider.GetRequiredService().Database.Migrate(); } if (app.Environment.IsDevelopment())