Пример #1
0
 protected override void Dispose(bool disposing)
 {
     if (disposing)
     {
         db.Dispose();
     }
     base.Dispose(disposing);
 }
Пример #2
0
 protected virtual void Dispose(bool disposing)
 {
     if (!_disposed)
     {
         if (disposing)
         {
             _ToDoContext.Dispose();
         }
     }
     _disposed = true;
 }
 public virtual void Dispose(bool disposing)
 {
     if (!this.disposed)
     {
         if (disposing)
         {
             _repository.Dispose();
         }
     }
     this.disposed = true;
 }
Пример #4
0
 protected virtual void Dispose(bool disposing)
 {
     if (!this.disposed)
     {
         if (disposing)
         {
             _context.Dispose();
         }
     }
     this.disposed = true;
 }
Пример #5
0
        // Protected implementation of Dispose pattern.
        protected virtual void Dispose(bool disposing)
        {
            if (disposed)
            {
                return;
            }

            if (disposing)
            {
                // Free any other managed objects here.
                //
            }

            // Free any unmanaged objects here.
            if (context != null)
            {
                context.Dispose();
            }

            disposed = true;
        }
Пример #6
0
 public void Dispose()
 {
     _context.Dispose();
 }
Пример #7
0
 public void Dispose()
 {
     _db.Dispose();
     GC.SuppressFinalize(this);
 }
 public void Dispose()
 {
     _toDoContext?.Dispose();
     (_readOnlyToDoContext as IDisposable)?.Dispose();
 }