Ejemplo n.º 1
0
        public async Task <IActionResult> Index()
        {
            var countries = await _countryService.GetAllCountriesAsync();

            var continents = await _continentService.GetAllContinentsAsync();

            var vm = new ContinentCountryViewModel(
                continents.Take(5).OrderByDescending(a => a.InfectedNo).ToList(),
                countries.Take(5).OrderByDescending(a => a.InfectedNo).ToList()
                );

            return(View(vm));
        }
Ejemplo n.º 2
0
        public async Task <IActionResult> Index()
        {
            var continents = await _continentService.GetAllContinentsAsync();

            return(View(continents.OrderByDescending(a => a.InfectedNo)));
        }