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