// GET: Games/Edit/5 public ActionResult Edit(int?id) { Game game = null; if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } try { game = GameManager.RetrieveGame(id.Value); } catch (Exception) { return(HttpNotFound()); } _gameInEdit = game; try { ViewBag.Consoles = ConsoleManager.RetrieveConsoles(); ViewBag.Developers = DeveloperManager.RetrieveDevelopers(); ViewBag.Publishers = PublisherManager.RetrievePublishers(); } catch (Exception) { } return(View(game)); }
// GET: Games/Create public ActionResult Create() { try { ViewBag.Consoles = ConsoleManager.RetrieveConsoles(); ViewBag.Developers = DeveloperManager.RetrieveDevelopers(); ViewBag.Publishers = PublisherManager.RetrievePublishers(); } catch (Exception) { } return(View()); }