예제 #1
0
        public async Task <ActionResult <IEnumerable <StudentsWithProjectsDto> > > GetStudent(int id)
        {
            // var student = await _context.Student.FindAsync(id);
            var student = await _studentRepo.GetSingleStudentWithProjects(id);

            if (student == null)
            {
                return(NotFound());
            }

            return(Ok(_mapper.Map <StudentsWithProjectsDto>(student)));
        }