public async Task <IActionResult> Index() { var viewModel = new CountriesListViewModel { Countries = await this.countriesService.GetAllAsync <CountryViewModel>(), }; return(this.View(viewModel)); }
public IViewComponentResult Invoke() { var countries = this.countriesService.GetMostPopular(); var viewModel = new CountriesListViewModel { Countries = countries, }; return(this.View(viewModel)); }