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