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

            return(Page());
        }
コード例 #2
0
ファイル: HomeController.cs プロジェクト: kishan574/odeToFood
        public IActionResult Details(int id)
        {
            var rest = _resturant.Get(id);

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