private async Task SetStudentViewModelListsProperties(StudentFormViewModel viewModel) { viewModel.Grades = await _gradeRepository.GetGrades(); viewModel.Groups = await _groupRepository.GetGroups(); viewModel.Majors = await _majorRepository.GetMajors(); }
// GET: Admin/Grades public async Task <ActionResult> Index() { var grades = await _gradeRepository.GetGrades(); // Add properties to layout AddPageHeader("Grades", "List of all grades"); AddBreadcrumb("Grades", ""); return(View(grades)); }
public IEnumerable <Grade> GetGrades() { return(_gradeObj.GetGrades()); }