public IActionResult Lounge(decimal id) { Groep groep = _groepRepository.GetById(id); if (groep == null) { return(NotFound()); } if (groep.Currentstate == null) { groep.InitializeState(); groep.GekozenEnVergrendeld(); //groep.KanSpelen(); //groep.Spelen(); _groepRepository.SaveChanges(); } else if (groep.Currentstate.GetStateEnum() == State.BLOK) { return(RedirectToAction("Feedback", "Groep", new { Id = groep.Id })); } return(View(groep)); }