public ActionResult Countries()
        {
            IEnumerable <CountryDTO> countryDtos = service.GetCountries();
            var countries       = countryDtos.Select(x => CountryViewModel.CountryDTOToView(x));
            var countriesToView = countries.Where(x => x.Info != null).ToList();

            return(View(countriesToView));
        }
        public ActionResult AddAttraction()
        {
            var model = new CountriesCitiesAttractionVeiwModel();

            model.Countries = service.GetCountries().Select(x => CountryViewModel.CountryDTOToView(x));
            model.Cities    = service.GetCities().Select(x => CityViewModel.CityFromDtoToView(x));
            return(View(model));
        }
        //public HomeController()
        //{
        //}

        public ActionResult Index()
        {
            IEnumerable <CountryDTO> countryDtos = service.GetCountries();
            //Mapper.Initialize(cfg => cfg.CreateMap<CountryDTO, CountryViewModel>());
            //var countries = Mapper.Map<IEnumerable<CountryDTO>, List<CountryViewModel>>(countryDtos);
            var countries = countryDtos.Select(x => CountryViewModel.CountryDTOToView(x));

            //Mapper.Initialize(cfg => cfg.CreateMap<CountryDTO, CountryViewModel>()
            //        .ForMember("PhoneId", opt => opt.MapFrom(src => src.Id)));


            //IEnumerable<CityDTO> cityDtos = service.GetCities();
            //Mapper.Initialize(cfg => cfg.CreateMap<CityDTO, CityViewModel>());
            //var cities = Mapper.Map<IEnumerable<CityDTO>, List<CityViewModel>>(cityDtos);

            //IEnumerable<RegionDTO> regionDtos = service.GetRegions();
            //Mapper.Initialize(cfg => cfg.CreateMap<RegionDTO, RegionViewModel>());
            //var regions = Mapper.Map<IEnumerable<RegionDTO>, List<RegionViewModel>>(regionDtos);

            //var geolocation = new {countries, cities, regions};
            //  return View(geolocation);
            return(View(countries));
        }