public ActionResult DeleteConfirmed(int id) { gru gru = db.grus.Find(id); db.grus.Remove(gru); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "Reference_number,Address,Post_Code,Suburb,Latitude,Longitude,Site_history,Restricted_uses,Map_link")] gru gru) { if (ModelState.IsValid) { db.Entry(gru).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(gru)); }
// GET: gru/Delete/5 public ActionResult Delete(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } gru gru = db.grus.Find(id); if (gru == null) { return(HttpNotFound()); } return(View(gru)); }