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]; } }
// GET: api/Student public async Task <IEnumerable <Student.Data.Models.Student> > GetAsync() { var studentList = await studentsRepo.GetStudentsAsync(); return(studentList); }
/// <summary> /// Получение студентов определенной группы. /// </summary> /// <param name="groupId">ИД группы.</param> /// <returns></returns> public Task <ISTrainingPartResponse <IEnumerable <Student> > > GetStudentsAsync(int groupId) { return(repository.GetStudentsAsync(groupId)); }