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