protected override void Dispose(bool disposing)
 {
     if (disposing)
     {
         db.Dispose();
     }
     base.Dispose(disposing);
 }
Example #2
0
 // Prevent Memory Leak
 protected override void Dispose(bool disposing)
 {
     using (dbEntities db = new dbEntities())
         db.Dispose();
     base.Dispose(disposing);
 }