Check LINQ query against SQL Server database

前端 未结 5 1661
天涯浪人
天涯浪人 2021-02-06 11:25

Is there any way to in .NET to see what LINQ query against database we are firing? For eg. I am wring a query in LINQ and I want to see that what SQL query is firing to communic

5条回答
  •  遥遥无期
    2021-02-06 12:01

    You can also use SQL Server Profiler, Trace or Extended Events. First two are deprecated.

    https://technet.microsoft.com/en-us/library/bb630354(v=sql.105).aspx

    https://msdn.microsoft.com/en-us/library/ms181091.aspx

    https://technet.microsoft.com/en-us/library/ms191006(v=sql.105).aspx

提交回复
热议问题