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