public async Task <IActionResult> Index() { string clientIpAddress = HttpContext.GetIpAddress(); ListOfPlacesViewModels listOfPlaces = await Execute(() => _skyscannerService.Location.GetPlaceByIpAddress(clientIpAddress)); ListOfCountriesViewModels listOfCountries = await Execute(() => _skyscannerService.Location.GetListOfCountries()); return(View((listOfCountries, listOfPlaces))); }
public async Task <ListOfPlacesViewModels> GetPlaceByIpAddress( string ipAddress, string country = "UK", string currency = "GBP", string locale = "en-GB") { ListOfPlaces listOfPlaces = await _skyscannerProvider.GetPlaceByIpAddress(ipAddress, country, currency, locale); ListOfPlacesViewModels listOfPlaceViewModels = _skyscannerMapper.MapListOfPlacesToListOfPlacesViewModel(listOfPlaces); return(listOfPlaceViewModels); }
public async Task <ListOfPlacesViewModels> GetPlaceByIpAddress( string ipAddress, string country = "UK", string currency = "GBP", string locale = "en-GB") { ListOfPlaces listOfPlaces = await FileHelper.GetDataAsync <ListOfPlaces>(FileName.PARENT_FOLDER, FileName.PLACE_IP_80_73_11_139); ListOfPlacesViewModels listOfPlaceViewModels = _skyscannerMapper.MapListOfPlacesToListOfPlacesViewModel(listOfPlaces); return(listOfPlaceViewModels); }