public ActionResult Edit(MovieReviews review) { if (ModelState.IsValid) { _db.Entry(review).State = EntityState.Modified; _db.SaveChanges(); return RedirectToAction("Index", new { id = review.MovieId }); } return View(); }
public ActionResult Create(MovieReviews _review) { if (ModelState.IsValid) { _db.MovieReviews.Add(_review); _db.SaveChanges(); return RedirectToAction("Index", new { id = _review.MovieId }); } return View(_review); }