▲ | javier2 4 days ago | ||||||||||||||||
It dont think C# looks at the code? I suspect it can track that you called p.Name, then generate sql with this information? | |||||||||||||||||
▲ | ziml77 4 days ago | parent | next [-] | ||||||||||||||||
The C# compiler is looking at that code. It sees that the lambda is being passed into a function which accepts an Expression as a parameter, so it compiles the lambda as an expression tree rather than behaving like it's a normal delegate. | |||||||||||||||||
▲ | adzm 4 days ago | parent | prev [-] | ||||||||||||||||
The lambda is converted into an Expression, basically a syntax tree, which is then analyzed to see what is accessed. | |||||||||||||||||
|