http://geekswithblogs.net/Martinez/archive/2009/06/29/understanding-expression-trees.aspx
By reading this article that expline what are Expression trees and what they are used for I have some question thats the article those not answer me clearly.
A. What is the difference between Data Structure and ‘compiled piece of code’.
* I know that data structure is Array,List,.. But this is not the answer I am looking for.
B. Why is it better to use data structure in Entity Framework than ‘compiled piece of code’ in terms of efficiency.
Answer to both A and B.
The compiled piece of code can not be reverse engineered into something that you can translate to SQL. There are to many details that made the original concepts you want to translate to SQL go away. The expression trees can be analyzed and understood at run time, when the compiled code can not.
Another meta representation of the queries would be possible to use, but the expression trees gives the advantage that existing plumbing in the compiler can be used for a lot of the heavy work.