Created
April 18, 2015 20:17
-
-
Save davidsonsousa/7790a4220cf3b8c82541 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private List<Country> _countries; | |
public IEnumerable<SelectListItem> CountryItems | |
{ | |
get | |
{ | |
IEnumerable<SelectListItem> selectCountries = new List<SelectListItem>(); | |
selectCountries = _countries.Select(x => new SelectListItem | |
{ | |
Value = x.Id.ToString(), | |
Text = x.Name | |
}); | |
return DefaultItem.Concat(selectCountries); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment