Esempio n. 1
0
 // PUT: api/Products/5
 public void Put(int id, [FromBody]ProductEntity product)
 {
     var productRepository = new ProductRepository();
     var updatedProduct = productRepository.Save(product);
 }
Esempio n. 2
0
 // POST: api/Products
 public void Post([FromBody]ProductEntity product)
 {
     var productRepository = new ProductRepository();
     var newProduct = productRepository.Save(product);
 }