Beispiel #1
0
        private async Task LoadDataAsync()
        {
            studentList.Clear();
            var query = await studentsRepository.GetStudentsAsync();

            foreach (Student.Data.Models.Student s in query)
            {
                studentList.Add(s);
            }

            RecordCount = studentList.Count;
            if (studentList.Count > 0)
            {
                SelectedPerson = studentList[0];
            }
        }
Beispiel #2
0
        // GET: api/Student
        public async Task <IEnumerable <Student.Data.Models.Student> > GetAsync()
        {
            var studentList = await studentsRepo.GetStudentsAsync();

            return(studentList);
        }
Beispiel #3
0
 /// <summary>
 /// Получение студентов определенной группы.
 /// </summary>
 /// <param name="groupId">ИД группы.</param>
 /// <returns></returns>
 public Task <ISTrainingPartResponse <IEnumerable <Student> > > GetStudentsAsync(int groupId)
 {
     return(repository.GetStudentsAsync(groupId));
 }