public async Task <IViewComponentResult> InvokeAsync(Guid ChildId) { UpdateStudentRecordViewModel ViewModel = new UpdateStudentRecordViewModel() { Semesters = await _semData.GetSemestersAsync(), Subjects = await _subjectData.GetStudentSubjectsAsync(ChildId), ChildId = ChildId }; return(View(ViewModel)); }
async Task CallData() { var response = await _dataServices.GetSemestersAsync(); ViewModel = new SemestersViewModel(); ViewModel.Semesters = new List <Semester>(); if (response.Count > 0) { ViewModel.Semesters.AddRange(response); } }
public async Task <IViewComponentResult> InvokeAsync(Guid ChildId) { SemesterRegistrationViewModel viewModel = new SemesterRegistrationViewModel() { ChildId = ChildId }; viewModel.Semesters = new List <Semester>(); viewModel.Semesters = await _data.GetSemestersAsync(); return(View(viewModel)); }