Just trying to get the sql that is generated by a linq query.
Use SQL Profiler if you are using SQL Server as your database.
SQL Profiler