Esempio n. 1
0
 public IActionResult OnGet(int restaurantId)
 {
     Restaurant = restaurantData.GetRestaurantsById(restaurantId);
     if (Restaurant != null)
     {
         return(Page());
     }
     else
     {
         return(RedirectToPage("./notfound"));
     }
 }
Esempio n. 2
0
        public IActionResult OnGet(int?restaurantId)
        {
            Cuisines = htmlHelper.GetEnumSelectList <CuisineType>();

            if (restaurantId.HasValue)
            {
                Restaurant = restaurantData.GetRestaurantsById(restaurantId.Value);
            }
            else
            {
                Restaurant = new Restaurant();
            }
            if (Restaurant == null)
            {
                return(RedirectToPage("./notfound"));
            }
            else
            {
                return(Page());
            }
        }