async Task <IReadOnlyList <Hero> > GetHeroes() { var heroes = await repository.GetHeroesAsync(applicationHostLifetime.ApplicationStopping); foreach (var hero in heroes) { logger.LogInformation("Hero found : {Id} ({Guide})", hero.Id, hero.GuideUri); } return(heroes); }
public async Task <IActionResult> GetHeroes() { var results = await _heroesRepository.GetHeroesAsync(); return(Ok(results)); }