public int CreateProduct(Domain.BE.Product product) { try { ProductRepository repo = new ProductRepository(context); repo.Add(product); return(product.Id); } catch (Exception ex) { throw new Exception(ex.Message); } }
public bool UpdateProduct(Domain.BE.Product product) { try { ProductRepository repo = new ProductRepository(context); repo.Update(product); return(true); } catch (Exception) { return(false); } }