Exemplo n.º 1
0
 public IActionResult OnGet(int resturantId)
 {
     resturant = ResturantData.GetResturantById(resturantId);
     if (resturant == null)
     {
         return(RedirectToPage("./NotFound"));
     }
     return(Page());
 }
Exemplo n.º 2
0
        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());
        }