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(); }
public IActionResult Geocode() { var viewModel = new GeocodeViewModel(); return(View(viewModel)); }