Exemplo n.º 1
0
        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>()));
 }