Example #1
0
        protected override void Dispose(bool disposing)
        {
            if (disposing)
            {
                if (_carrierRepository != null)
                {
                    _carrierRepository.Dispose();
                    _carrierRepository = null;
                }

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

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

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

            base.Dispose(disposing);
        }