public async Task <IEnumerable <StudentDto> > GetStudentsAsync(int groupId) { var students = await _studentsRepository .GetAllAsync(s => s.GroupRefId == groupId) .ConfigureAwait(false); return(_mapper.Map <IEnumerable <StudentDto> >(students)); }
// GET: Students public async Task <ActionResult> Index() { var data = await coursesRepository.GetAllAsync(); var model = data.Select(x => new StudentModel { Id = x.Id, AverageMark = x.AverageMark, BirthYear = x.BirthYear, FirstName = x.FirstName, LastName = x.LastName, GroupId = x.GroupId }); return(View(model)); }
public async override Task OnAppearing() { var studentsCollection = await StudentsRepo.GetAllAsync(); Students = new ObservableCollection <StudentsEntity>(studentsCollection); }