public IActionResult OnGet(int?studentId) { Majors = htmlHelper.GetEnumSelectList <Majors>(); if (studentId.HasValue) { Student = studentAppData.GetById(studentId.Value); } if (studentId == null) { return(RedirectToPage("./NotFound")); } return(Page()); }
public void OnGet(int studentId) { Student = studentAppData.GetById(studentId); }