예제 #1
0
        public IActionResult Play()
        {
            Puppy Pikachu = HttpContext.Session.GetObjectFromJson <Puppy>("Pikachu");

            Pikachu.Play();
            @ViewBag.Pikachu = HttpContext.Session.GetObjectFromJson <Puppy>("Pikachu");
            HttpContext.Session.SetObjectAsJson("Pikachu", Pikachu);
            return(RedirectToAction("Index"));
        }