Exemplo n.º 1
0
        public async Task <PagedList <WorkShift> > GetWorkShiftByEmployeeIdAsync(WorkShiftParameters workShiftParameters)
        {
            IQueryable <WorkShift> result = FindByCondition(ws => ws.EmployeeId == workShiftParameters.EmployeeId);

            return(await PagedList <WorkShift> .ToPageList(result.OrderBy(ws => ws.ShiftId),
                                                           workShiftParameters.PageNumber, workShiftParameters.PageSize));
        }
Exemplo n.º 2
0
 public async Task <PagedList <WorkShift> > GetAllWorkShiftAsync(WorkShiftParameters workShiftParameters)
 {
     return(await PagedList <WorkShift> .ToPageList(FindAll().OrderBy(ws => ws.ShiftId),
                                                    workShiftParameters.PageNumber, workShiftParameters.PageSize));
 }
        public async Task <ActionResult> GetWorkShiftsByEmployeeId([FromQuery] WorkShiftParameters workShiftParameters)
        {
            var workShift = await _repoWrapper.WorkShift.GetWorkShiftByEmployeeIdAsync(workShiftParameters);

            return(Ok(workShift));
        }