public ActionResult Create() { ExhibitsViewModel vm = new ExhibitsViewModel(); vm.ArtList = ArtsDb.GetCurrentArts_SelectListItems(db); return(View(vm)); }
// GET: Exhibits/Edit/5 public ActionResult Edit(string id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } Exhibit ex = db.DbExhibit.Find(id); if (ex == null) { return(HttpNotFound()); } ExhibitsViewModel vm = new ExhibitsViewModel { Name = ex.Name, Date = ex.Date, Location = ex.Location, ArtList = ArtsDb.GetCurrentArts_SelectListItems(db) }; return(View(vm)); }