[WIP] Use compiled queries
All checks were successful
Test / Run tests (push) Successful in 2m1s

This commit is contained in:
2026-04-04 15:28:30 +02:00
parent bd1e579674
commit 2916d41095
39 changed files with 370 additions and 359 deletions

View File

@@ -35,7 +35,7 @@ namespace Elwig.Documents {
protected override async Task LoadData(AppDbContext ctx) {
await base.LoadData(ctx);
Season = ctx.Seasons.Find(_year) ?? throw new ArgumentException("invalid season");
Season = await ctx.FetchSeasons(_year).SingleOrDefaultAsync() ?? throw new ArgumentException("Invalid season");
MemberDeliveredWeight = await ctx.Deliveries
.Where(d => d.Year == Season.Year && d.MgNr == Member.MgNr)
.SelectMany(d => d.Parts)