5 ms·
I thought I spelled this out quite clearly, but the ROE query provided does exactly that: it builds an optimized SQL query and executes it in the database. In
by gecko 17y ago
I thought I spelled this out quite clearly, but the ROE query provided does exactly that: it builds an optimized SQL query and executes it in the database. In the example provided, the SQL generated will roughly be "select firstName from people where people.type = (whatever the adult enum is)". To do so, the lambdas don't actually take each row of the database; they basically take abstract syntax trees that record what messages you send to it. At execution time, the AST is optimized and sent to SQL. This can leak at certain places--for example, calling a real method on the object, rather than comparing attributes--but they're identical to the places LINQ to SQL falls apart.
- waldrews 17y agoHumble apologies, I didn't read the article properly and mistook the argument for a (much less sophisticated) one that's a pet peeve.