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.
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.