exact sql query executed by Entity Framework

后端 未结 3 1384
忘掉有多难
忘掉有多难 2021-01-23 05:25

the question seems clear enough, but I\'ll add a case

using (var context = new MyEntities())
{
  if(context.mytable.Any(row => row.myfield == 2))
  {
    // d         


        
3条回答
  •  说谎
    说谎 (楼主)
    2021-01-23 06:00

    You can find a similar question here: How to view generated SQL from Entity Framework?

    To sum up, your choices are:

    • LINQPad
    • SQL Server Profiler
    • Entity Framework Profiler

    See the referenced question for details.

提交回复
热议问题