public async Task <ActionResult> Index() { IEnumerable <Student> students = await _service.GetAllAsync(); return(View(students)); }
public async Task <IEnumerable <StudentViewDto> > GetAllStudents() { return(_mapper.Map <IEnumerable <StudentViewDto> >(await _studentsService.GetAllAsync() ?? new List <Student>())); }