示例#1
0
        public IActionResult Geocode(GeocodeViewModel viewModel)
        {
            var locations = _locationRepository.GetAll();

            foreach (var location in locations)
            {
                var coords = _geocodingService.GetCoordinates(location.Name);
                location.Lat  = coords["lat"];
                location.Long = coords["long"];
                _locationRepository.Update(location);
            }
            return(View(new GeocodeViewModel()));
        }
 public CitiesView()
 {
     InitializeComponent();
     DataContext = new GeocodeViewModel();
 }
示例#3
0
        public IActionResult Geocode()
        {
            var viewModel = new GeocodeViewModel();

            return(View(viewModel));
        }