public IEnumerable PutProduct(int id, Product product)
 {
     //product.Id = id;
     if (repository.Update(product))
     {
         return(repository.GetAll());
     }
     else
     {
         return(null);
     }
 }
示例#2
0
 public async Task <ActionResult> UpateProduct([FromBody] Product product)
 {
     return(Ok(await _productRepositories.Update(product)));
 }