Exemple #1
0
 public void Dispose(bool disposing)
 {
     if (disposing)
     {
         _context.Dispose();
     }
 }
 protected virtual void Dispose(bool disposing)
 {
     if (disposing)
     {
         _libraryDbContext?.Dispose();
     }
 }
 protected override void Dispose(bool disposing)
 {
     if (disposing)
     {
         db.Dispose();
     }
     base.Dispose(disposing);
 }
Exemple #4
0
 protected virtual void Dispose(bool disposing)
 {
     if (!_disposed)
     {
         if (disposing)
         {
             _context.Dispose();
         }
     }
     _disposed = true;
 }
Exemple #5
0
 protected virtual void Dispose(bool disposing)
 {
     if (!this.disposed)
     {
         if (disposing)
         {
             DbContext.Dispose();
         }
     }
     this.disposed = true;
 }
Exemple #6
0
        private bool disposedValue = false; // To detect redundant calls


        protected virtual void Dispose(bool disposing)
        {
            if (!disposedValue)
            {
                if (disposing)
                {
                    // TODO: dispose managed state (managed objects).
                    _dbContext.Dispose();
                }

                // TODO: free unmanaged resources (unmanaged objects) and override a finalizer below.
                // TODO: set large fields to null.

                disposedValue = true;
            }
        }