public IActionResult OnGet(int theaterId) { Theaters = theaterData.GetById(theaterId); if (Theaters == null) { return(RedirectToPage("./NotFound")); } return(Page()); }
public IActionResult OnGet(int?theaterID) { Performances = htmlHelper.GetEnumSelectList <PerformanceType>(); if (theaterID.HasValue) { Theaters = theaterData.GetById(theaterID.Value); } else { Theaters = new Theaters(); } if (Theaters == null) { return(RedirectToPage("./NotFound")); } return(Page()); }