Exemple #1
0
        private async Task PopulateSelectedPaises(int?paisId = null)
        {
            var paises = await _paisHttpService.GetAllAsync(null);

            ViewBag.Paises = new SelectList(paises, nameof(PaisViewModel.Id),
                                            nameof(PaisViewModel.Nome),
                                            paisId);
        }
 // GET: Pais
 public async Task <IActionResult> Index(string keySearch = null)
 {
     ViewBag.keySearch = keySearch;
     return(View(await _paisHttpService.GetAllAsync(keySearch)));
 }