示例#1
0
        public IActionResult Details(int id)
        {
            var model = _bucketData.Get(id);

            if (model == null)
            {
                return(RedirectToAction(nameof(Index)));
            }
            return(View(model));
        }
示例#2
0
        public IActionResult OnGet(int id)
        {
            BucketData = _bucketData.Get(id);

            if (BucketData == null)
            {
                return(RedirectToAction("Index", "Home"));
            }

            return(Page());
        }