protected override void Dispose(bool disposing)
 {
     if (disposing)
     {
         if (productService != null)
         {
             productService.Dispose();
             productService = null;
         }
         if (providerRepository != null)
         {
             providerRepository.Dispose();
             providerRepository = null;
         }
         if (packagingRepository != null)
         {
             packagingRepository.Dispose();
             packagingRepository = null;
         }
         if (currencyTypeRepository != null)
         {
             currencyTypeRepository.Dispose();
             currencyTypeRepository = null;
         }
         if (productDocumentService != null)
         {
             productDocumentService.Dispose();
             productDocumentService = null;
         }
     }
     base.Dispose(disposing);
 }
Example #2
0
 protected override void Dispose(bool disposing)
 {
     if (disposing && providerRepository != null)
     {
         providerRepository.Dispose();
         providerRepository = null;
     }
     base.Dispose(disposing);
 }
Example #3
0
 protected override void Dispose(bool disposing)
 {
     if (disposing)
     {
         if (productService != null)
         {
             productService.Dispose();
             productService = null;
         }
         if (providerRepository != null)
         {
             providerRepository.Dispose();
             providerRepository = null;
         }
         if (packagingRepository != null)
         {
             packagingRepository.Dispose();
             packagingRepository = null;
         }
         if (freightTypeRepository != null)
         {
             freightTypeRepository.Dispose();
             freightTypeRepository = null;
         }
         if (currencyTypeRepository != null)
         {
             currencyTypeRepository.Dispose();
             currencyTypeRepository = null;
         }
         if (productDocumentService != null)
         {
             productDocumentService.Dispose();
             productDocumentService = null;
         }
         if (sellerCompanyRepository != null)
         {
             sellerCompanyRepository.Dispose();
             sellerCompanyRepository = null;
         }
         if (iibbTreatmentRepository != null)
         {
             iibbTreatmentRepository.Dispose();
             iibbTreatmentRepository = null;
         }
     }
     base.Dispose(disposing);
 }
Example #4
0
 public void Dispose()
 {
     _providerRepository?.Dispose();
     _addressRepository?.Dispose();
 }