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