← Tutti gli articoli

How to see the SQL statements that your Entity Framework application executes.

27 August 2012  ·  EDF · Article  ·  387 visite

How to see the SQL statements that your Entity Framework application executes.

  1. var contents = from c  in  context.Contents  
  2.             where c.Title == "Asp.net"  
  3.             select c;  
  4. ObjectQuery objectQuery = (ObjectQuery)contents;  
  5. Console.WriteLine(objectQuery.ToTraceString());  
Si è verificato un errore imprevisto. Ricarica

Rejoining the server...

Rejoin failed... trying again in seconds.

Failed to rejoin.
Please retry or reload the page.

The session has been paused by the server.

Failed to resume the session.
Please retry or reload the page.