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

This commit is contained in:
2026-04-04 15:28:30 +02:00
parent bd1e579674
commit c3cf239cba
35 changed files with 332 additions and 302 deletions

View File

@@ -38,7 +38,7 @@ namespace Elwig.Documents {
protected override async Task LoadData(AppDbContext ctx) {
await base.LoadData(ctx);
Season = await ctx.Seasons.OrderBy(s => s.Year).LastOrDefaultAsync() ?? throw new ArgumentException("invalid season");
Season = await ctx.FetchSeasons().FirstOrDefaultAsync() ?? throw new ArgumentException("Invalid season");
MemberBuckets = await ctx.GetMemberBuckets(Utils.CurrentYear, Member.MgNr);
ActiveAreaCommitments = await Member.ActiveAreaCommitments(ctx)
.Include(c => c.Contract).ThenInclude(c => c.Revisions)