How can I find out what the TSQL Entity Framework generates for a query?

Submit this linq request:

return db.Projects.Where(p => p.ProjectID == id);

How can I find out what TSQL generates?

+3
source share
3 answers

I am using LINQPad

You can see your queries as lambda expressions or SQL

+2
source

SQL Server Profiler does just that. If you are on SQL Server Express, there is an open source alternative called AnjLab Sql Profiler because the SQL server profiler is not included in express.

+1
source

Sql Server Profiler . , EF.

0
source

Source: https://habr.com/ru/post/1773252/


All Articles