示例#1
0
        public async Task <IActionResult> GetByDateRange([FromQuery] UserParams userParams, string startdate, string enddate)
        {
            var inspections = await _repo.GetInspectionM2s(userParams, startdate, enddate);

            var inspectionsToReturn = _mapper.Map <IEnumerable <InspectionForListDto> >(inspections);

            Response.AddPagination(inspections.CurrentPage, inspections.PageSize,
                                   inspections.TotalCount, inspections.TotalPages);

            return(Ok(inspectionsToReturn));
        }