예제 #1
0
        public IEnumerable <Airport> GetAirports()
        {
            IEnumerable <Airport> airports = null;

            using (var stream = fileHelper.ReadResourceFileAsStream("GuestlogixTestXF.Data.airports.csv"))
            {
                airports = CsvConverter.Serialize <Airport>(stream);
            }

            return(airports);
        }
예제 #2
0
        /// <summary>
        /// Returns all routes from the CSV-file
        /// </summary>
        public IEnumerable <Route> GetRoutes()
        {
            IEnumerable <Route> routes = null;

            using (var stream = fileHelper.ReadResourceFileAsStream("GuestlogixTestXF.Data.routes.csv"))
            {
                routes = CsvConverter.Serialize <Route>(stream);
            }

            return(routes);
        }