public ActionResult Edit(Review review) { if (ModelState.IsValid) { db.Entry(review).State = EntityState.Modified; db.SaveChanges(); return RedirectToAction("Index"); } return View(review); }
public ActionResult Create(Review review) { if (ModelState.IsValid) { db.Reviews.Add(review); db.SaveChanges(); return RedirectToAction("Index"); } return View(review); }