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)); }
public async Task <IActionResult> Index() { var continents = await _continentService.GetAllContinentsAsync(); return(View(continents.OrderByDescending(a => a.InfectedNo))); }