public ActionResult Create(Actor actor) { if (ModelState.IsValid) { db.Actores.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); }