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