public ProductResult UpdateProduct(Product product) { var result = new ProductResult(); try { _productRepository.Update(product); } catch (Exception ex) { result.AddError(ex, "Product update failed"); } result.Product = product; return(result); }
public ProductResult InsertProduct(Product product) { var result = new ProductResult(); try { _productRepository.Insert(product); } catch (Exception ex) { result.AddError(ex, "Product insert failed"); } result.Product = product; return(result); }