I'm looking to dynamically select fields from a linq query where the fields names are in a csv string.
public IEnumerable<object> GetAllPeople(string fields)
{
return (from p in people
where p.alive == true
select (the csv fields parameter (ie. fields = Name,Age,Height);
}
Yes, I'm using this as sort of a poor mans OData because I can't use OData where I am.