示例#1
0
        public async Task <IActionResult> GetAssignments([FromQuery] AssignmentParams assignmentParams)
        {
            var assignments = await _repo.GetAssignments(assignmentParams);

            var assignmentsToReturn = _mapper.Map <IEnumerable <AssignmentForListDto> >(assignments);

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

            return(Ok(assignmentsToReturn));
        }