示例#1
0
        // DELETE: api/Usuario/5
        public HttpResponseMessage Delete(int id)
        {
            HttpResponseMessage httpMsg = null;

            try
            {
                UsuarioModel usuario = new UsuarioModel();
                usuario.id = id;

                usuarioDomain.DeleteUsers(id);
                httpMsg = Request.CreateResponse(HttpStatusCode.OK, usuario);

                return(httpMsg);
            }
            catch (Exception ex)
            {
                httpMsg = Request.CreateErrorResponse(HttpStatusCode.InternalServerError, ex.Message);
            }

            return(httpMsg);
        }