public void Add(ProductDataViewModel productDataViewModel) { if (!(_productDataRepository.GetAll().Where(pd => pd.PropertyID == productDataViewModel.PropertyID && pd.ProductID == productDataViewModel.ProductID).Any())) { ProductData productData = MapFromViewModel(productDataViewModel); _productDataRepository.Add(productData); } }
public IEnumerable <ProductModel> GetAll(string searchBy, string search, int?page) { return(_dataRepo.GetAll(searchBy, search, page)); }