コード例 #1
0
 public void Put(String oldKitchenName, [FromBody] Kitchen Kitchen)
 {
     if (ModelState.IsValid)
     {
         KitchenRepository.Update(oldKitchenName, Kitchen);
     }
 }
コード例 #2
0
 public ActionResult Put(int id, [FromBody] Kitchen value)
 {
     try
     {
         value.Id = id;
         return(Ok(_repo.Update(value)));
     }
     catch (Exception e)
     {
         return(BadRequest(e));
     }
 }