private async Task ViewbagAddress() { var cities = await _sharedService.GetCities(); ViewBag.Cities = cities; var city = cities.FirstOrDefault(); var districtid = city.Id; ViewBag.Districts = await _sharedService.GetDistricts(districtid); }
public async Task <IActionResult> GetDistricts(int cityid) { var model = await _sharedService.GetDistricts(cityid); return(Json(model)); }