public async Task <ActionResult> EditRegion(string id) { var region = await _placesService.GetRegion(id); if (region != null) { var regionMunicipalities = await _placesService.GetMunicipalitiesByRegion(region.Id); var regionViewModel = mapper.Map <Region, RegionViewModel>(region); var listMunicipalities = mapper.Map <List <Municipality>, List <MunicipalityViewModel> >(regionMunicipalities); EditRegionViewModel viewModel = new EditRegionViewModel() { Region = regionViewModel, Municipalities = listMunicipalities, OriginalName = regionViewModel.Name }; return(View(viewModel)); } return(RedirectToAction("Index")); }