public HttpResponseMessage PutState(int EditorialId, bool State) { try { DbLibrary dbLibrary = new DbLibrary(); BO_Editorial boEditorial = new BO_Editorial(dbLibrary); DataMessage dataMessage = new DataMessage(boEditorial.ChangeState(EditorialId, State)); return(Request.CreateResponse(HttpStatusCode.OK, dataMessage)); } catch (Exception e) { ErrorMessage mensaje = new ErrorMessage("2.1", "Excepción en el cambio de estado del registro: " + e.GetBaseException().Message, e.ToString()); return(Request.CreateResponse(HttpStatusCode.BadRequest, mensaje)); } }