public ActionResult CreateSleep(int id)
        {
            Tama tamagotchi = Tama.Find(id);

            tamagotchi.MakeSleep();
            return(View("Details", tamagotchi));
        }
Exemple #2
0
        public ActionResult CreateSleep(int id)
        {
            Tama        tamagotchi = Tama.Find(id);
            List <Tama> allTama    = Tama.GetAll();

            tamagotchi.MakeSleep();
            Tama.CheckForDead();
            return(tamagotchi.IsDead() ? RedirectToAction("Index", allTama) : RedirectToAction("Details", tamagotchi));
        }