// PUT: api/Plant/5 /// <summary> /// Update (PUT) plant by id /// </summary> /// <param name="id"></param> /// <param name="value"></param> /// <returns></returns> public HttpResponseMessage Put(long id, [FromBody] Plant value) { PlantPersistence pp = new PlantPersistence(); bool recordExisted = false; recordExisted = pp.updatePlant(id, value); HttpResponseMessage response; if (recordExisted) { response = Request.CreateResponse(HttpStatusCode.NoContent); } else { response = Request.CreateResponse(HttpStatusCode.NotFound); } return(response); }