How do I view the SQL generated by entity framework ?
(In my particular case I\'m using the mysql provider - if it matters)
There are two ways:
ToTraceString()
. You can add it into your watch window and set a breakpoint to see what the query would be at any given point for any LINQ query.tail -f
. You can learn more about MySQL's logging facilities in the official documentation. For SQL Server, the easiest way is to use the included SQL Server profiler.