// WebApi 2 will call this automatically after each
 // request. You need this to ensure your context is disposed
 // and the memory it is using is freed when your app does garbage
 // collection.
 protected override void Dispose(bool disposing)
 {
     if (disposing)
     {
         db.Dispose();
     }
     base.Dispose(disposing);
 }
예제 #2
0
 public void Dispose()
 {
     _db.Dispose();
 }