Quantcast
Channel: entityframework Discussions Rss Feed
Viewing all articles
Browse latest Browse all 1793

New Post: How to get generated SQL queries from DbContext

$
0
0
Hi,

I have been using DbContext and DbSet<T> with POCO on EF5.

Is there any way to get the SQL queries generated by DbContext?

I know I can do a ToString on a IQueryable to get the select, but I'm looking for ways to see other commands like the ones generated by Find, Any, SaveChanges, etc.

Using Linq 2 SQL I know we can add a tracer to log anything that goes through the provider. How do we do this with DbContext?

Or I shouldn't be using DbContext and there is better way to work with code-first POCO that allows tracing of SQL queries?

Thanks in advance.

Viewing all articles
Browse latest Browse all 1793

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>