示例#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];
            }
        }
示例#2
0
        // GET: api/Student
        public async Task <IEnumerable <Student.Data.Models.Student> > GetAsync()
        {
            var studentList = await studentsRepo.GetStudentsAsync();

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