public async Task <ActionResult> Index()
        {
            var airports = await _airportQueryService.GetAllEuropeanAirportsAsync();

            var iatas     = airports.Select(a => a.Iata);
            var viewModel = new DistanceViewModel(iatas);

            if (TempData["error"] is string error)
            {
                SetSelectedAirports(viewModel);
                viewModel.Error = error;
            }
            else if (TempData["distance"] is Distance distance)
            {
                SetSelectedAirports(viewModel);
                viewModel.Distance = distance;
            }

            return(View(viewModel));
        }
        public async Task <ActionResult> Index()
        {
            var viewModel = new AirportsViewModel(await _countryQueryService.GetAllCountriesAsync());

            if (TempData["country"] is string country)
            {
                TempData["country"] = country;
                viewModel.Airports.AddRange(await _airportQueryService.GetAllEuropeanAirportsAsyncByCountry(country));
                var filter = viewModel.Countries.FirstOrDefault(c => c.Value.Equals(country));

                if (filter != null)
                {
                    filter.Selected = true;
                }
            }
            else
            {
                viewModel.Airports.AddRange(await _airportQueryService.GetAllEuropeanAirportsAsync());
            }

            return(View(viewModel));
        }