public async Task <IActionResult> Grad() { var getGrad = new GetGraduate(); var grad = await getGrad.GetGradDegrees(); var gradViewModel = new GradViewModel() { Grads = grad, Title = "Graduate Programs" }; return(View(gradViewModel)); }
//used for both undergrad and grad (to combine pages) public async Task <IActionResult> Grad() { //GetGraduate() is in the Services folder var getGrad = new GetGraduate(); var grad = await getGrad.GetGradDegrees(); //calls to the ViewModels GradViewModel() var gradViewModel = new GradViewModels() { Grads = grad, Title = "Graduate Programs" }; //Nothing here yet - Want YOU to populate it with the api call to undergrad (and need to build the view and model!) return(View(gradViewModel)); }
/* * Combined the Undergrad and Graduate calls to the API to display all * information onto one page */ public async Task <IActionResult> Degree() { var getUnder = new GetUnderGraduate(); var under = await getUnder.GetAllUnderGrads(); var getGrad = new GetGraduate(); var grad = await getGrad.GetAllGrads(); var degreeViewModel = new DegreeViewModel() { UnderGrads = under.ToList(), Grad = grad.ToList(), Title = "A Look At Our Programs" }; return(View(degreeViewModel)); }
public async Task <IActionResult> Degrees() { var singleFooter = new GetFooter(); var footer = await singleFooter.GetSimpleFooter(); var getUnder = new GetUndergraduate(); var under = await getUnder.GetUnderGradDegrees(); var getGrad = new GetGraduate(); var grad = await getGrad.GetAllGraduate(); var degreeViewModel = new DegreeViewModel() { FooterInfo = footer, UnderGrads = under, Graduates = grad, Title = "Degree Programs" }; return(View(degreeViewModel)); }