示例#1
0
        public async Task <ActionResult <IEnumerable <StudentDto> > > GetStudents(Guid ClassId, [FromQuery] string Gender, string q)
        {
            if (!await _classRoomRepository.ClassRoomExists(ClassId))
            {
                return(NotFound());
            }
            var Students = await _studentRepository.GetStudentAsync(ClassId, Gender, q);

            var StudentsDto = _mapper.Map <IEnumerable <StudentDto> >(Students);

            return(Ok(StudentsDto));
        }