[#79] Entities: Remove EF proxies

This commit is contained in:
2026-04-01 16:24:03 +02:00
parent 4460de9975
commit 9c39a2f820
50 changed files with 471 additions and 413 deletions

View File

@@ -52,12 +52,8 @@ namespace Elwig.Models.Dtos {
if (mgnr != null) q = q.Where(p => p.Delivery.MgNr == mgnr);
await q
.Include(p => p.Delivery)
.Include(p => p.Variety)
.Include(p => p.Attribute)
.Include(p => p.Quality)
.Include(p => p.Buckets)
.Include(p => p.PartModifiers)
.ThenInclude(m => m.Modifier)
.Include(p => p.PartModifiers).ThenInclude(m => m.Modifier)
.LoadAsync();
return await table.FromSqlRaw($"""
SELECT p.*
@@ -65,7 +61,7 @@ namespace Elwig.Models.Dtos {
JOIN delivery_part p ON (p.year, p.did, p.dpnr) = (v.year, v.did, v.dpnr)
WHERE (p.year = {y} OR {y} IS NULL) AND (v.mgnr = {m} OR {m} IS NULL)
ORDER BY p.year, v.mgnr, v.sortid, v.abgewertet ASC, v.attribute_prio DESC, COALESCE(v.attrid, '~'), v.kmw DESC, v.lsnr, v.dpnr
""").ToListAsync();
""").IgnoreAutoIncludes().ToListAsync();
}
}