public IActionResult OnGet(int?id) { Cuisines = htmlHelper.GetEnumSelectList <CuisineType>(); if (id.HasValue) { Resturant = resturant.GetById(id.Value); } else { Resturant = new Resturant(); } if (Resturant == null) { return(RedirectToPage("../Error")); } return(Page()); }
public void OnGet(int Id) { Resturant = resturants.GetById(Id); }