This is similar to the same query, they return the same result, but I donβt know which one can be faster, it should be marked with a bench.
But, in the case of linq2sql
, I prefer the correlated subquery over the join, because currently, if you want to check the equation of two elements, you should use the syntax:
new {X,Y} equals new {X',Y'}
in a connection, and if you have more than this equation, you should convert it to a subquery. Therefore, I prefer to have more readable code that uses minimal differences in difference actions.
source share