Exemplo n.º 1
0
        public IHttpActionResult ActualizarUsuario(ApiRequest <USUARIO> request)
        {
            try
            {
                if (!ModelState.IsValid)
                {
                    return(BadRequest(ModelState));
                }

                var result = logica.ActualizaUsuario(request.Model);
                apiResponseModelCrear.Model = result;
                apiResponseModelCrear.StatusIsSuccessful = true;
                apiResponseModelCrear.ResponseCode       = HttpStatusCode.OK;
                return(ResponseMessage(Request.CreateResponse(apiResponseModelCrear.ResponseCode, apiResponseModelCrear)));
            }
            catch (Exception exception)
            {
                apiResponseModelCrear.Model = false;
                apiResponseModelCrear.StatusIsSuccessful = false;
                apiResponseModelCrear.ResponseCode       = HttpStatusCode.InternalServerError;
                return(ResponseMessage(Request.CreateResponse(apiResponseModelCrear.ResponseCode, apiResponseModelCrear)));
            }
        }
 // PUT: api/Usuario/5
 public void Put(string encriptado)
 {
     logica.ActualizaUsuario(usuario);
 }