public AirportCollection GetAllAirports() { AirportCollection results = new AirportCollection(); IList list = AdoTemplate.QueryWithRowMapper(CommandType.Text, "SELECT * FROM airport", airportMapper); //TODO - add support to queries for supplying own collection implementation? // Why not using IResultSetExtrator ? foreach (Airport airport in list) { results.Add(airport); } return(results); }
public AirportDaoStub() { airports.Add(new Airport(1, "TPA", "Tampa", "Tampa International Airport")); airports.Add(new Airport(2, "MCO", "Orlando", "Orlando International Airport")); airports.Add(new Airport(3, "SFO", "San Francisco", "San Francisco International Airport")); airports.Add(new Airport(4, "ORD", "Chicago", "O'Hare International Airport")); airports.Add(new Airport(5, "LGA", "New York", "La Guardia International Airport")); airports.Add(new Airport(6, "LHR", "London", "London Heathrow")); }