Beispiel #1
0
        public ActionResult List()
        {
            var airports = Airports;

            if (airports == null)
            {
                airports = _airportService.GetAirportListInEU();
                HttpContext.Response.Headers.Add("from-feed", "true");
                Airports = airports;
            }

            var countries = airports?.GroupBy(f => f.iso).Select(f => f.Key).OrderBy(f => f).ToList();

            var model = new AirportViewModel {
                Airports = airports, Countries = countries
            };

            return(View(model));
        }