// POST: api/Plant /// <summary> /// Post to api /// </summary> /// <param name="value"></param> /// <returns></returns> public HttpResponseMessage Post([FromBody] Plant value) { PlantPersistence pp = new PlantPersistence(); long id; id = pp.savePlant(value); value.ID = id; HttpResponseMessage response = Request.CreateResponse(HttpStatusCode.Created); response.Headers.Location = new Uri(Request.RequestUri, string.Format("Plant/{0}", id)); return(response); }