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)); }