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