public IActionResult OnGet(int jobId) { Job = jobData.GetById(jobId); if (Job == null) { return(RedirectToPage("./NotFound")); } return(Page()); }
public IActionResult OnGet(int?jobId) { Departments = htmlHelper.GetEnumSelectList <DepartmentType>(); if (jobId.HasValue) { Job = jobData.GetById(jobId.Value); } else { Job = new Job(); } if (Job == null) { return(RedirectToPage("./NotFound")); } return(Page()); }