Загрузка данных


var app = builder.Build();

// --- Создание БД и сидирование ---
using (var scope = app.Services.CreateScope())
{
    var context = scope.ServiceProvider.GetRequiredService<AppDbContext>();
    context.Database.EnsureCreated(); // ← вот здесь
}
// ---------------------------------

// ... middleware ...
app.Run();