Esempio n. 1
0
        // PUT api/contacts/5
        public ReturnValue Put(int id, [FromBody] Contacts value)
        {
            if (value == null)
            {
                throw new HttpResponseException(HttpStatusCode.NotFound);
            }

            ReturnValue returnValue = new ReturnValue();

            try
            {
                returnValue.value = entity.ContactUpdate(value.UsersSN, value.PhoneHash, value.PhoneName);
                returnValue.code  = 0;
                returnValue.msg   = "succes";
            }
            catch
            {
                throw new HttpResponseException(HttpStatusCode.InternalServerError);
            }

            return(returnValue);
        }