private async Task ViewDataAddressesAndStores() { IList <Address> addresses = await addressBusiness.GetAddresses(); IList <Store> stores = await storeBusiness.getAllStores(); IList <Country> countries = await countryBusiness.GetCountries(); ViewData["idAddress"] = SelectListHelper.SelectListAddresses(addresses); ViewData["idStore"] = SelectListHelper.SelectListStores(stores); ViewData["idCountry"] = SelectListHelper.SelectListCountries(countries); }
// GET: Customer/Create public async Task <IActionResult> Create() { ViewData["idAddress"] = SelectListHelper.SelectListAddresses(await addressBusiness.GetAddresses()); ViewData["idCountry"] = SelectListHelper.SelectListCountries(await countryBusiness.GetCountries()); return(View()); }
private async Task ViewDataAddressesAndCountries() { ViewData["idAddress"] = SelectListHelper.SelectListAddresses(await addressBusiness.GetAddresses()); ViewData["idCountry"] = SelectListHelper.SelectListCountries(await countryBusiness.GetCountries()); }