public ActionResult Delete(int BoardGameId) { BoardGame deletedGame = repository.DeleteGame(BoardGameId); if (deletedGame != null) { TempData["message"] = string.Format("Игра \"{0}\" была удалена", deletedGame.NameGame); } return(RedirectToAction("Index")); }