Ejemplo n.º 1
0
        public async Task <IActionResult> GetStudents([FromQuery] StudentParams studentParams)
        {
            var students = await _repo.GetStudents(studentParams);

            var studentsToReturn = _mapper.Map <IEnumerable <StudentForListDto> >(students);

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

            return(Ok(studentsToReturn));
        }