LINQ to Entities: Compiled Queries

Last Friday I blogged about making local variables behave consistently in LINQ to Entities queries. And the solution I recommended was compiled queries. But just today I realized that I haven’t blogged about compiled queries in general yet.     The main purpose of compiled queries to improve performance. While regular LINQ to Entities queries…

3

Behavior of Variables in LINQ to Entities Queries

LINQ is very nice about referencing local variables without any additional declaration. When I ran my first such LINQ to Entities query, I was ecstatic. The next moment I was puzzled – are the values of those variables picked at compile-time and later used as constants, or are they picked at each execution, so they…

2