Tricky problem here. I\'m trying to convert items for a list to IEnumerable.
dynamicTextInDatabase si
If you need to convert a List of objects (without Enums) to IEnumerable, you can use a declarative style of LINQ:
var items = from TipoDoc t in tipoDocs
select new SelectListItem {Value = t.Id, Text = t.Description};
Here, tipoDocs is a List of objects of type TipoDoc
public class TipoDoc
{
public string Id { get; set; }
public string Description { get; set; }
}