public ActionResult Edit(TamagotchiVM tamagotchiVM)
        {
            if (ModelState.IsValid)
            {
                _tamagotchiRepository.Edit(tamagotchiVM.ToModel());
                return(RedirectToAction("Index"));
            }
            ViewBag.PlayerUserId = new SelectList(_playerUserRepository.GetAll(), "PlayerUserId", "PlayerUserName", tamagotchiVM.PlayerUserId);

            return(View(tamagotchiVM));
        }
        public ActionResult Create(TamagotchiVM tamagotchiVM)
        {
            ViewBag.PlayerUserId = new SelectList(_playerUserRepository.GetAll(), "PlayerUserId", "PlayerUserName", tamagotchiVM.PlayerUserId);

            tamagotchiVM.IsALive = true;
            if (ModelState.IsValid)
            {
                _tamagotchiRepository.Add(tamagotchiVM.ToModel());
                return(RedirectToAction("Index"));
            }

            return(View(tamagotchiVM));
        }