public IActionResult Feed() { Dojodachi dojo = DojodachiHelper.Get(HttpContext); dojo.Feed(); DojodachiHelper.Save(HttpContext, dojo); return(RedirectToAction("Index")); }
public IActionResult Feed() { Dojodachi pet = HttpContext.Session.GetObjectFromJson <Dojodachi>("Pet"); TempData["Message"] = pet.Feed(); TempData["End"] = pet.Check(); HttpContext.Session.SetObjectAsJson("Pet", pet); return(RedirectToAction("Index")); }