Beispiel #1
0
        public IActionResult OnGet(int id)
        {
            resturant = _resturantData.Get(id);
            if (resturant == null)
            {
                return(Redirect("/home/index"));
            }

            return(Page());
        }
Beispiel #2
0
        public IActionResult Details(int id)
        {
            var rest = _resturant.Get(id);

            if (rest == null)
            {
                return(NotFound());
            }
            else
            {
                return(View(rest));
            }
        }