Add database seeder with sample data and test guide

This commit is contained in:
steinhelge
2025-11-23 21:46:18 +01:00
parent 4b61bd7c29
commit 646ab0aef1
3 changed files with 569 additions and 0 deletions
+8
View File
@@ -22,6 +22,14 @@ builder.Services.AddScoped<ITransactionService, TransactionService>();
var app = builder.Build();
// Seed database with sample data
using (var scope = app.Services.CreateScope())
{
var context = scope.ServiceProvider.GetRequiredService<HospitalityDbContext>();
await Hospitality.Backend.Data.DbSeeder.SeedAsync(context);
}
// Configure the HTTP request pipeline.
if (app.Environment.IsDevelopment())
{