Takes a list of and convert it into a SelectList.
public static SelectList<TSource, TResult> ToSelectList(this IEnumerable<TSource> source,
Func<TSource, TResult> selector, bool firstEmpty = true,
string emptyValue = "", bool emptyGuid = false, bool other = false)
A list to convert into a SelectList.
A function passed through to specify which properties in the list to use for the SelectList.
Make the first item in the SelectList an empty or blank item.
If the firstEmpty is true then set this value as the empty value.
If the firstEmpty is true then set this value as the Empty Guid {00000000-0000-0000-0000-000000000000} value.
ViewBag.List = db.MySpGet().ToSelectList(x => SiUtil.SelectListItem(x.MyFieldId, x.MyField));