コード例 #1
0
        public ProductSiteMappingDTO GetProductSiteMappinById(int productSiteMappingId)
        {
            ProductSiteMappingDTO productSiteMappingDTO = null;
            var productSiteMapping = unitOfWork.ProductSiteMappingRepository.GetById(productSiteMappingId);

            if (productSiteMapping != null)
            {
                productSiteMappingDTO = ProductSiteMappingConvertor.ConvertToProductSiteMappingDto(productSiteMapping);
            }
            return(productSiteMappingDTO);
        }
コード例 #2
0
        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);
        }