[#79] Entities: Remove EF proxies
This commit is contained in:
@@ -85,7 +85,6 @@ namespace Elwig.Windows {
|
||||
using var ctx = new AppDbContext();
|
||||
var list = await ctx.DeliverySchedules
|
||||
.Where(s => s.Year == ViewModel.FilterSeason)
|
||||
.Include(s => s.Branch)
|
||||
.OrderBy(s => s.DateString)
|
||||
.ThenBy(s => s.Branch.Name)
|
||||
.ThenBy(s => s.Description)
|
||||
@@ -110,12 +109,7 @@ namespace Elwig.Windows {
|
||||
var (filter, deliveryAncmts, stat) = await Task.Run(async () => {
|
||||
using var ctx = new AppDbContext();
|
||||
var (_, deliveryAncmtQuery, filter) = await vm.GetFilters(ctx);
|
||||
var deliveryAncmts = await deliveryAncmtQuery
|
||||
.Include(a => a.Member.BillingAddress)
|
||||
.Include(a => a.Schedule)
|
||||
.Include(a => a.Variety)
|
||||
.AsSplitQuery()
|
||||
.ToListAsync();
|
||||
var deliveryAncmts = await deliveryAncmtQuery.ToListAsync();
|
||||
|
||||
if (filter.Count > 0 && deliveryAncmts.Count > 0) {
|
||||
var dict = deliveryAncmts.AsParallel()
|
||||
@@ -189,8 +183,6 @@ namespace Elwig.Windows {
|
||||
|
||||
ControlUtils.RenewItemsSource(MemberInput, await ctx.Members
|
||||
.Where(m => m.IsActive || !IsCreating)
|
||||
.Include(m => m.PostalDest.AtPlz!.Ort)
|
||||
.Include(m => m.DefaultWbKg!.AtKg)
|
||||
.OrderBy(m => m.Name)
|
||||
.ThenBy(m => m.GivenName)
|
||||
.ThenBy(m => m.MgNr)
|
||||
@@ -286,8 +278,6 @@ namespace Elwig.Windows {
|
||||
using var ctx = new AppDbContext();
|
||||
ControlUtils.RenewItemsSource(MemberInput, await ctx.Members
|
||||
.Where(m => m.IsActive || !IsCreating)
|
||||
.Include(m => m.PostalDest.AtPlz!.Ort)
|
||||
.Include(m => m.DefaultWbKg!.AtKg)
|
||||
.OrderBy(m => m.Name)
|
||||
.ThenBy(m => m.GivenName)
|
||||
.ThenBy(m => m.MgNr)
|
||||
@@ -415,8 +405,6 @@ namespace Elwig.Windows {
|
||||
using var ctx = new AppDbContext();
|
||||
ControlUtils.RenewItemsSource(MemberInput, await ctx.Members
|
||||
.Where(m => m.IsActive || !IsCreating)
|
||||
.Include(m => m.PostalDest.AtPlz!.Ort)
|
||||
.Include(m => m.DefaultWbKg!.AtKg)
|
||||
.OrderBy(m => m.Name)
|
||||
.ThenBy(m => m.GivenName)
|
||||
.ThenBy(m => m.MgNr)
|
||||
|
||||
Reference in New Issue
Block a user