Exemple #1
0
        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);
        }
Exemple #2
0
        public async Task <IActionResult> GetHeroes()
        {
            var results = await _heroesRepository.GetHeroesAsync();

            return(Ok(results));
        }