Example #1
0
        public async Task <ActionResult <IEnumerable <DependentDto> > > GetDependentsForEmployee(int employeeId, [FromQuery] UserParams userParams)
        {
            var dependents = await _dependentRepository.GetDependentsAsync(userParams, employeeId);

            Response.AddPaginationHeader(dependents.CurrentPage,
                                         dependents.PageSize,
                                         dependents.TotalCount,
                                         dependents.TotalPages);
            return(Ok(dependents));
        }