//Get country details from the CountryFunctions class and display view. public async Task <IActionResult> Country(string id) { if (id == null) { return(NotFound()); } var country = await CountryFunctions.GetCountryByCode(id); if (country == null) { return(NotFound()); } return(View(country)); }
//Get sub-region from the CountruyFunctions class and display view. public async Task <IActionResult> SubRegion(string id) { if (id == null) { return(NotFound()); } var subRegion = await CountryFunctions.GetSubRegion(id); if (subRegion == null) { return(NotFound()); } return(View(subRegion)); }
//Get list of countries from the CountryFunctions class and display view. public async Task <IActionResult> Index(string searchString) { return(View(await CountryFunctions.GetCountries(searchString))); }