Deferred execution in Linq pitfall(s)(weblogs.asp.net)
submitted by
findmecool(600) 4 years, 4 months ago
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.
|category: Database
|Views: 6
tags:
LINQ SQL Database another
Everyones tags:
Your Tags: