You are returning an IEnumerable<string>
public static IEnumerable<string> AllCountries
{
get
{
return countryRegex.Keys;
}
}
When you need to return an IEnumerable<SelectListItem>
Something like this (not tested):
public static IEnumerable<SelectListItem> AllCountries
{
get
{
var countries = new List<SelectListItem>();
foreach(var country in countryRegex.Keys)
{
countries.Add(SelectListItem() { Text = country, Value = country };
}
return countries;
}
}