Product-enhancements-and-validation-fixes
This commit is contained in:
@@ -167,10 +167,12 @@ app.MapControllerRoute(
|
||||
|
||||
app.MapControllers(); // API routes
|
||||
|
||||
// Ensure database is created
|
||||
// Apply database migrations and seed data
|
||||
using (var scope = app.Services.CreateScope())
|
||||
{
|
||||
var context = scope.ServiceProvider.GetRequiredService<LittleShopContext>();
|
||||
|
||||
// Ensure database is created (temporary while fixing migrations)
|
||||
context.Database.EnsureCreated();
|
||||
|
||||
// Seed default admin user
|
||||
|
||||
Reference in New Issue
Block a user