0
kicks
Deferred execution in Linq pitfall(s)
Say you have this query in Linq to Sql
What order is fetched: 10254 or 10255? That's right, 10255! The 'id' used in the query is added as a member access node to the expression tree. As Linq expression trees are converted to Sql when they're executed, it means that at that time, the value of id is evaluated and used inside the query.