AsSpliterQuery adde on AdminWorkflow metods - update new changes admin workflow

This commit is contained in:
SamSys
2025-01-07 18:51:13 +03:30
parent 9b1f141dec
commit db79e8ecf1
8 changed files with 139 additions and 49 deletions

View File

@@ -1,5 +1,6 @@
using _0_Framework.Application;
using _0_Framework.InfraStructure;
using Microsoft.EntityFrameworkCore;
using WorkFlow.Application.Contracts.RollCallConfirmedAbsence;
using WorkFlow.Domain.RollCallConfirmedAbsenceAgg;
@@ -15,7 +16,7 @@ public class RollCallConfirmedAbsenceRepository : RepositoryBase<long, RollCallC
public List<RollCallConfirmAbsenceViewModel> GetConfirmAbsencesBy(long workshopId, DateTime start, DateTime end)
{
return _workFlowContext.RollCallConfirmedAbsences.Where(x => x.WorkshopId == workshopId &&
return _workFlowContext.RollCallConfirmedAbsences.AsSplitQuery().Where(x => x.WorkshopId == workshopId &&
x.AbsenceDate.Date >= start.Date && x.AbsenceDate.Date <= end.Date).Select(x => new RollCallConfirmAbsenceViewModel()
{
AbsenceDate = x.AbsenceDate,