public void UpdateProductSiteMapping(ProductSiteMappingDTO productSiteMappingDTO)
        {
            ProductSiteMapping productSiteMapping = new ProductSiteMapping();

            ProductSiteMappingConvertor.ConvertToProductSiteMappingEntity(ref productSiteMapping, productSiteMappingDTO, true);
            unitOfWork.ProductSiteMappingRepository.Update(productSiteMapping);
        }
        public void AddProductSiteMapping(ProductSiteMappingDTO productSiteMappingDTO)
        {
            ProductSiteMapping productSiteMapping = new ProductSiteMapping();

            ProductSiteMappingConvertor.ConvertToProductSiteMappingEntity(ref productSiteMapping, productSiteMappingDTO, false);
            unitOfWork.ProductSiteMappingRepository.Add(productSiteMapping);
        }
        public ProductSiteMappingDTO GetProductSiteMappinById(int productSiteMappingId)
        {
            ProductSiteMappingDTO productSiteMappingDTO = null;
            var productSiteMapping = unitOfWork.ProductSiteMappingRepository.GetById(productSiteMappingId);

            if (productSiteMapping != null)
            {
                productSiteMappingDTO = ProductSiteMappingConvertor.ConvertToProductSiteMappingDto(productSiteMapping);
            }
            return(productSiteMappingDTO);
        }
        public List <ProductSiteMappingDTO> GetAllProductSiteMapping()
        {
            List <ProductSiteMappingDTO> productSiteMappingList = new List <ProductSiteMappingDTO>();
            var productSiteMappings = unitOfWork.ProductSiteMappingRepository.GetAll();

            if (productSiteMappings != null)
            {
                foreach (var productSiteMapping in productSiteMappings)
                {
                    productSiteMappingList.Add(ProductSiteMappingConvertor.ConvertToProductSiteMappingDto(productSiteMapping));
                }
            }

            return(productSiteMappingList);
        }