public async Task <IActionResult> Create() { var address = new CustomersAddressInputModel { Cities = await this.addressService.GetCitiesByCountryAsync <CityViewModel>(GlobalConstants.CountryOfUsing) as ICollection <CityViewModel>, }; return(this.PartialView("_CreatePartial", address)); }
public async Task <IActionResult> Create(CustomersAddressInputModel address) { if (!this.ModelState.IsValid) { return(this.PartialView("_CreatePartial", address)); } await this.addressService.CreateAsync(address); return(this.PartialView("_CreatePartial", address)); }