예제 #1
0
        public List <Airport> GetAll()
        {
            var errorMessage = String.Empty;

            try
            {
                errorMessage = "Error reading CSV";
                var lines = ReaderHelper.ReadCSV(_path);
                errorMessage = "Error Converting CSV to Routes";
                var airports = Airport.ConvertToList(lines, ',');
                return(airports);
            }
            catch (Exception e)
            {
                throw new Exception(errorMessage, e);
            }
        }