public IActionResult OnGet(int resturantId) { resturant = ResturantData.GetResturantById(resturantId); if (resturant == null) { return(RedirectToPage("./NotFound")); } return(Page()); }
public IActionResult OnGet(int?resturantId) { Cuisines = this.HtmlHelper.GetEnumSelectList <CuisineType>(); if (resturantId.HasValue) { Resturant = resturantData.GetResturantById(resturantId.Value); } else { Resturant = new Resturant(); } if (Resturant == null) { return(RedirectToPage("./NotFound")); } return(Page()); }