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