[#79] AppDbContext: Use compiled queries
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user