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 Articles