public void UpdateMovie(Movie movie) { try { _dataSource.Update(movie.GetMappingMovieData()); CachedMovieList.Instance.Updated(); } catch (Exception ex) { throw new Exception("Could not update Movie", ex); } }
public ActionResult Create(FormCollection collection, Movie model) { try { if (ModelState.IsValid) { _service.InsertMovie(model); } return RedirectToAction("Index"); } catch { return View(); } }
public ActionResult Edit(int id, FormCollection collection, Movie model) { try { if (ModelState.IsValid) { _service.UpdateMovie(model); } return RedirectToAction("Index"); } catch { return View(); } }
// GET: Movies/Create public ActionResult Create() { var model = new Movie(); return View(model); }