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