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