Product-enhancements-and-validation-fixes

This commit is contained in:
sysadmin
2025-09-01 08:03:00 +01:00
parent c8a55c143b
commit ee4a5c3578
12 changed files with 340 additions and 211 deletions

View File

@@ -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