public ActionResult Edit(Movie movie) { if (ModelState.IsValid) { fac.GetMovieGateway().Edit(movie); return RedirectToAction("Index"); } ViewBag.GenreId = new SelectList(fac.GetMovieGateway().ReadAll(), "Genre.Id", "Genre.Name", movie); return View(); }
public ActionResult Create(Movie mov,FormCollection collection) { if (ModelState.IsValid) { fac.GetMovieGateway().Add(mov); return RedirectToAction("Index"); } ViewBag.GenreId = new SelectList(fac.GetMovieGateway().ReadAll()); return View(); }