public StudentViewModel GetStudentById(Guid studentId) { var e = _studentsRepo.GetStudentById(studentId); if (e != null) { var result = _autoMapper.Map <StudentViewModel>(e); return(result); } else { return(null); }; }
public async Task <Student> Get(int id) { return(await studentsRepository.GetStudentById(id)); }