exact sql query executed by Entity Framework

后端 未结 3 1383
忘掉有多难
忘掉有多难 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:01

    If you are connecting to SQL Server, you can use the SQL Profiler in order to obtain the SQL that is generated.

提交回复
热议问题