public ActionResult DeleteConfirmed(int id) { museumTable museumTable = db.museumTables.Find(id); db.museumTables.Remove(museumTable); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "MuseumID,Name,Location,Contact,Art")] museumTable museumTable) { if (ModelState.IsValid) { db.Entry(museumTable).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(museumTable)); }
public ActionResult Create([Bind(Include = "MuseumID,Name,Location,Contact,Art")] museumTable museumTable) { if (ModelState.IsValid) { db.museumTables.Add(museumTable); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(museumTable)); }
// GET: museumTables/Delete/5 public ActionResult Delete(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } museumTable museumTable = db.museumTables.Find(id); if (museumTable == null) { return(HttpNotFound()); } return(View(museumTable)); }