public ActionResult DeleteConfirmed(int id) { PlotDB plotDB = db.graves.Find(id); db.graves.Remove(plotDB); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "ID")] PlotDB plotDB) { if (ModelState.IsValid) { db.Entry(plotDB).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(plotDB)); }
public ActionResult Create([Bind(Include = "ID")] PlotDB plotDB) { if (ModelState.IsValid) { db.graves.Add(plotDB); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(plotDB)); }
// GET: PlotDBs/Edit/5 public ActionResult Edit(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } PlotDB plotDB = db.graves.Find(id); if (plotDB == null) { return(HttpNotFound()); } return(View(plotDB)); }