public async Task <List <Person> > GetFlightPassengers(string flightNumber) { if (String.IsNullOrEmpty(flightNumber)) { throw new Exception("Flight Number is required"); } var flightRep = new FlightRepository(); var bookingRep = new BookingRepository(); var f = flightRep.GetFlightByNumber(flightNumber); if (f == null) { throw new Exception("Flight not found"); } var booking = bookingRep.GetBookingByFlightId(f.Id); var passengers = booking.Passengers; return(passengers.ToList()); }