Пример #1
0
        protected override void Dispose(bool disposing)
        {
            if (disposing)
            {
                if (_packingListRepository != null)
                {
                    _packingListRepository.Dispose();
                    _packingListRepository = null;
                }

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

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

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

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

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

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

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

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

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

            base.Dispose(disposing);
        }