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