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