Пример #1
0
 public void Dispose()
 {
     if (shareContext && (Context != null))
     {
         Context.Dispose();
     }
 }
 protected override void Dispose(bool disposing)
 {
     if (disposing)
     {
         db.Dispose();
     }
     base.Dispose(disposing);
 }
Пример #3
0
 protected virtual void Dispose(bool disposing)
 {
     if (!this._disposed)
     {
         if (disposing)
         {
             _context.Dispose();
         }
         this._disposed = true;
     }
 }
Пример #4
0
 public void Dispose()
 {
     _context?.Dispose();
 }
Пример #5
0
        public void Dispose()
        {
            if (_contacts != null)
            {
                _contacts.Dispose();
            }

            if (_countries != null)
            {
                _countries.Dispose();
            }

            if (_cities != null)
            {
                _cities.Dispose();
            }

            if (_states != null)
            {
                _states.Dispose();
            }

            if (_customers != null)
            {
                _customers.Dispose();
            }

            if (_orders != null)
            {
                _orders.Dispose();
            }

            if (_ordersProducts != null)
            {
                _ordersProducts.Dispose();
            }

            if (_ordersTypes != null)
            {
                _ordersTypes.Dispose();
            }

            if (_products != null)
            {
                _products.Dispose();
            }

            if (_providers != null)
            {
                _providers.Dispose();
            }

            if (_stocks != null)
            {
                _stocks.Dispose();
            }

            if (_storages != null)
            {
                _storages.Dispose();
            }

            if (_typesUnities != null)
            {
                _typesUnities.Dispose();
            }

            if (_unities != null)
            {
                _unities.Dispose();
            }

            if (_vendors != null)
            {
                _vendors.Dispose();
            }

            if (_transactions != null)
            {
                _transactions.Dispose();
            }

            if (_invoices != null)
            {
                _invoices.Dispose();
            }

            if (_invoiceItems != null)
            {
                _invoiceItems.Dispose();
            }

            if (_invoiceTaxes != null)
            {
                _invoiceTaxes.Dispose();
            }

            if (_messageLog != null)
            {
                _messageLog.Dispose();
            }

            if (_companies != null)
            {
                _companies.Dispose();
            }

            if (_branches != null)
            {
                _branches.Dispose();
            }

            if (_invoiceSeries != null)
            {
                _invoiceSeries.Dispose();
            }

            if (_invoiceRps != null)
            {
                _invoiceRps.Dispose();
            }

            if (_purchaseOrders != null)
            {
                _purchaseOrderItems.Dispose();
            }

            if (_purchaseOrderItems != null)
            {
                _purchaseOrderItems.Dispose();
            }

            if (dbContext != null)
            {
                dbContext.Dispose();
            }

            GC.SuppressFinalize(this);
        }
Пример #6
0
        public void Dispose()
        {
            if (_contacts != null)
            {
                _contacts.Dispose();
            }

            if (_countries != null)
            {
                _countries.Dispose();
            }

            if (_customers != null)
            {
                _customers.Dispose();
            }

            if (_orders != null)
            {
                _orders.Dispose();
            }

            if (_ordersProducts != null)
            {
                _ordersProducts.Dispose();
            }

            if (_ordersTypes != null)
            {
                _ordersTypes.Dispose();
            }

            if (_products != null)
            {
                _products.Dispose();
            }

            if (_providers != null)
            {
                _providers.Dispose();
            }

            if (_stocks != null)
            {
                _stocks.Dispose();
            }

            if (_storages != null)
            {
                _storages.Dispose();
            }

            if (_typesUnities != null)
            {
                _typesUnities.Dispose();
            }

            if (_unities != null)
            {
                _unities.Dispose();
            }

            if (_vendors != null)
            {
                _vendors.Dispose();
            }

            if (_transactions != null)
            {
                _transactions.Dispose();
            }

            if (dbContext != null)
            {
                dbContext.Dispose();
            }

            GC.SuppressFinalize(this);
        }