Exemple #1
0
        private async Task PopulateSelectHeros(int?heroiId = null)
        {
            var herois = await _heroiAppService.GetAllAsync(null);

            ViewBag.Herois = new SelectList(
                herois,
                nameof(HeroiViewModel.Id),
                nameof(HeroiViewModel.HeroiNomeCompleto),
                heroiId);
        }
Exemple #2
0
 // GET: Heroi
 public async Task <IActionResult> Index()
 {
     return(View(await _heroiAppService.GetAllAsync(null)));
 }