public IActionResult Food() { Puppy Pikachu = HttpContext.Session.GetObjectFromJson <Puppy>("Pikachu"); Pikachu.Feed(); @ViewBag.Pikachu = HttpContext.Session.GetObjectFromJson <Puppy>("Pikachu"); HttpContext.Session.SetObjectAsJson("Pikachu", Pikachu); return(RedirectToAction("Index")); }