Example #1
0
        public ActionResult DeleteConfirmed(int id)
        {
            PlotDB plotDB = db.graves.Find(id);

            db.graves.Remove(plotDB);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Example #2
0
 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));
 }
Example #3
0
        public ActionResult Create([Bind(Include = "ID")] PlotDB plotDB)
        {
            if (ModelState.IsValid)
            {
                db.graves.Add(plotDB);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(plotDB));
        }
Example #4
0
        // 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));
        }