* Added required methods to services

This commit is contained in:
2025-04-03 09:27:32 +02:00
parent 94c4586c35
commit d7f49829a2
7 changed files with 41 additions and 27 deletions

View File

@@ -11,6 +11,11 @@ namespace FaKrosnoEfDataModel.Queries
.Include(x => x.ScheduleOrderDetails).ThenInclude(x => x.ScheduleOrderDetailDetails)
.ThenInclude(x => x.ScheduleOrderDetailDetailMiscs).Include(x => x.ScheduleOrderMiscs));
public static readonly Func<FaKrosnoDbContext, int, IEnumerable<ScheduleOrder?>> GetEntitiesByPurchaser =
EF.CompileQuery((FaKrosnoDbContext context, int purchaser) => context.ScheduleOrders
.Include(x => x.Recipient).ThenInclude(x => x.Purchaser).Include(x => x.ScheduleOrderDetails)
.ThenInclude(x => x.ScheduleOrderDetailMiscs).Where(x => x.Recipient.Purchaser.ID == purchaser));
public static readonly Func<FaKrosnoDbContext, DateTime, IEnumerable<ScheduleOrder?>> GetEntitiesByDate =
EF.CompileQuery((FaKrosnoDbContext context, DateTime fromDate) => context.ScheduleOrders
.Include(x => x.Recipient).ThenInclude(x => x.Purchaser).Include(x => x.ScheduleOrderDetails)