// PUT api/installusers/5 public ReturnValue Put(int id, [FromBody] InstallUsers value) { if (id < 0 || value == null) { throw new HttpResponseException(HttpStatusCode.BadRequest); } IMFREEEntities entity = new IMFREEEntities(); try { if (id == value.UserSN) { entity.InstallUserUpdate(value.UserSN, value.UserSN_Object); } else { throw new HttpResponseException(HttpStatusCode.BadRequest); } } catch { throw new HttpResponseException(HttpStatusCode.InternalServerError); } ReturnValue returnValue = new ReturnValue(); returnValue.code = 0; returnValue.msg = "succes"; return(returnValue); }