[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

@@ -74,7 +74,7 @@ namespace Elwig.Windows {
}
var areaComCount = await areaComQuery.CountAsync();
var season = await ctx.Seasons.FindAsync(await ctx.Seasons.MaxAsync(s => s.Year));
var season = await ctx.FetchSeasons().FirstOrDefaultAsync();
var stat = await AreaComService.GenerateToolTipData(areaComQuery, season?.MaxKgPerHa ?? 10_000);
return (filter, contracts, areaComs, areaComCount, stat);
@@ -180,12 +180,8 @@ namespace Elwig.Windows {
.Include(c => c.WineAttr)
.OrderBy(v => v.VtrgId)
.ToListAsync());
ControlUtils.RenewItemsSource(MemberInput, await ctx.Members
.OrderBy(m => m.Name).ThenBy(m => m.GivenName).ThenBy(m => m.MgNr)
.ToListAsync());
var cultList = await ctx.WineCultivations
.OrderBy(c => c.Name)
.Cast<object>().ToListAsync();
ControlUtils.RenewItemsSource(MemberInput, await ctx.FetchMembers(true).ToListAsync());
var cultList = await ctx.FetchWineCultivations().Cast<object>().ToListAsync();
cultList.Insert(0, new NullItem());
ControlUtils.RenewItemsSource(WineCultivationInput, cultList, null, ControlUtils.RenewSourceDefault.First);
await RefreshList();