Exemplo n.º 1
0
 protected override void Dispose(bool disposing)
 {
     if (disposing)
     {
         db.Dispose();
     }
     base.Dispose(disposing);
 }
Exemplo n.º 2
0
 public ActionResult DeleteConfirmed(int id)
 {
     using (FireStationEntities db = new FireStationEntities())
     {
         tbl_Accident tbl = db.tbl_Accident.Where(x => x.AccidentId == id).FirstOrDefault();
         tbl.Isdelete = true;
         db.SaveChanges();
         db.Dispose();
         return(RedirectToAction("Index"));
     }
 }