Пример #1
0
 public IActionResult OnGet(int id)
 {
     Stocksymbol = _stocksymbolData.Get(id);
     if (Stocksymbol == null)
     {
         return(RedirectToAction("Index", "Home"));
     }
     return(Page());
 }
Пример #2
0
        public IActionResult Details(int id)
        {
            var model = _stocksymbolData.Get(id);

            if (model == null)
            {
                return(RedirectToAction(nameof(Index)));
            }
            return(View(model));
        }