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); }