It’s a rather simple query but I can’t seem to get it done in EF.
The C# equivalent of:
SELECT A1, A2 from TABLEA WHERE A3 NOT IN ( SELECT B1 FROM TABLEB WHERE ... )
AND A4 IN ( SELECT C2 FROM TABLEC WHERE .... )
I would prefer to have the query run on the database as tableB has > 5000000 rows so performance is a big factor.
Like this
To see the SQL statement being generated you can either use the SQL statement tracer (don’t quote me on the name but it’s built into VS2010) or grab the statement as a
Stringvia