public ProductVO Update(ProductVO product) { var productEntity = _repository.FindById(product.Id ?? 0); SaveImageProduct imageProducts = new SaveImageProduct(_converter.Parse(product, productEntity)); imageProducts.Save(); return(_converter.Parse(_repository.Update(_converter.Parse(product, productEntity)))); }
public ProductVO Create(ProductVO product) { var productEntity = _converter.Parse(product); productEntity = _repository.Create(productEntity); SaveImageProduct imageProducts = new SaveImageProduct(productEntity); imageProducts.Save(); return(_converter.Parse(productEntity)); }