>>>I am going to try now this solution
http://archive.msdn.microsoft.com/LinqEntityDataReader by MS employee David Browne.
>>
>>Why do you flit from one thing you can't understand to another, to another..... Just loop through the Linq collection and build a datatable. No problem at all...
>
>I wanted to try this idea, but I don't know how to access the fields in the anonymous type.
>
>In other words, can you show me what can I do here?
>
>
> foreach (var row in resultingQuery)
>
>
>
>I can not convert row into DataRow, therefore I don't see a way to access each individual column of that resulting query. David's class solves this problem, but if I can create a simpler code, I'd love to.
I haven't tried with anonymous types, I mostly use concrete classes to select into. But through reflection you can enumerate the fields & properties in the object and then create the Data table based on these..... If the extension method works for you and creates what you need, this will probably be the simplest solution going forward...