public int Update(ProductBusinessModel product) { var mapper = GetMapper <ProductBusinessModel, Product>(); var productToUpdate = mapper.Map <ProductBusinessModel, Product>(product); return(_productRepository.Update(productToUpdate)); }
public int Add(ProductBusinessModel newProduct) { var mapper = GetMapper <ProductBusinessModel, Product>(); var product = mapper.Map <ProductBusinessModel, Product>(newProduct); return(_productRepository.Add(product)); }