score:0

You can use a trial version of Ants Profiler and move linqpad code to some test console application.

Your SQL query is faster than LINQ because LINQ query generation is a expensive procedure. To have a fair comparison, try to compile the LINQ query and compare a 2nd run with pure SQL. LINQ would still be slower (LINQ does much more a than just execute the query) but the difference should be way smaller.


Related Articles