public ActionResult DeleteConfirmed(int id) { PublisherSet publisherSet = db.PublisherSet.Find(id); db.PublisherSet.Remove(publisherSet); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "Id,Name,Country,Logo,Description")] PublisherSet publisherSet) { if (ModelState.IsValid) { db.Entry(publisherSet).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(publisherSet)); }
public ActionResult Create([Bind(Include = "Id,Name,Country,Logo,Description")] PublisherSet publisherSet) { if (ModelState.IsValid) { db.PublisherSet.Add(publisherSet); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(publisherSet)); }
// GET: PublisherSets/Delete/5 public ActionResult Delete(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } PublisherSet publisherSet = db.PublisherSet.Find(id); if (publisherSet == null) { return(HttpNotFound()); } return(View(publisherSet)); }