public HttpResponseMessage GetReservationByid(int id) { using (TECAirlinesDBEntities entities = new TECAirlinesDBEntities()) { var ent = entities.SELECT_RESERVATION_ID(id).ToList(); if (ent != null) { return(Request.CreateResponse(HttpStatusCode.OK, ent)); } else { return(Request.CreateErrorResponse(HttpStatusCode.NotFound, "La reservación con identificación " + id + "no existe.")); } } }