Пример #1
0
        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));
        }
Пример #2
0
        // 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));
        }
Пример #3
0
        public async override Task OnAppearing()
        {
            var studentsCollection = await StudentsRepo.GetAllAsync();

            Students = new ObservableCollection <StudentsEntity>(studentsCollection);
        }