score:2

Accepted answer

i just asked and answered a similar question (you can ignore all the datatable stuff, but it might be useful in that it shows how the mapping is used):

entity framework - iqueryable to datatable

the original post that shows how to get at the mapping between the object property positions and sql statement column positions can be found here:

how does entity framework manage mapping query result to anonymous type?

note: the second link only provides a mapping of the positions (as integer values) between the object properties and the sql statement columns...you'll have to use reflection to get at the actual object property names and then do some kind of string analysis on the sql statement to get the sql statement column names (you could use regular expressions for this, but that might be overkill).


Related Query

More Query from same tag