using backend.Data; using Microsoft.EntityFrameworkCore; var builder = WebApplication.CreateBuilder(args); builder.Services.AddDbContext(opt => opt.UseSqlite(builder.Configuration.GetConnectionString("Default"))); var app = builder.Build(); using (var scope = app.Services.CreateScope()) { var db = scope.ServiceProvider.GetRequiredService(); db.Database.Migrate(); } app.MapGet("/health", () => Results.Ok(new { ok = true })); app.Run(); public partial class Program { }