Пример #1
0
 protected override void DisposeCore()
 {
     if (dbContext != null)
     {
         dbContext.Dispose();
     }
 }
 protected override void Dispose(bool disposing)
 {
     if (disposing)
     {
         context.Dispose();
     }
     base.Dispose(disposing);
 }
Пример #3
0
        private void Dispose(bool disposing)
        {
            if (Context != null && !_disposed && disposing)
            {
                Context.Dispose();
            }

            _disposed = true;
        }
Пример #4
0
 protected virtual void Dispose(bool disposing)
 {
     if (!this.disposed)
     {
         if (disposing)
         {
             _databaseContext.Dispose();
         }
     }
     this.disposed = true;
 }
Пример #5
0
 public void Dispose()
 {
     dataContext.Dispose();
 }
Пример #6
0
 public void Dispose()
 {
     _context.Database.EnsureDeleted();
     _context.Dispose();
 }
Пример #7
0
 protected override void OnClosing(System.ComponentModel.CancelEventArgs e)
 {
     base.OnClosing(e);
     context.Dispose();
     thread.Abort();
 }
Пример #8
0
 public void Dispose()
 {
     _context?.Dispose();
 }