public IActionResult Create(Player newPlayer) { if (!ModelState.IsValid) { ViewBag.Players = _context.GetPlayers(); return(View("Index", newPlayer)); } _context.AddNewPlayer(newPlayer); return(RedirectToAction("Index")); }