2

Is there a way to get all the SQL change script of the object context?

Note: I am not talking about ObjectQuery.ToTraceString();

1 Answer 1

6

No unfortunately there isn't anything 'in' the product and available directly off the ObjectContext.

However you should take a look at Jarek's TracingProvider, that injects a layer between the EF and SqlClient to do logging etc.

Read about it here.

Sign up to request clarification or add additional context in comments.

2 Comments

Thanks for the answer. The solution is really amazing, and helps us reduce statement length and amount of queried data. I described the integration of EFTracingProvider on my blog devio.wordpress.com/2010/01/28/…
If this is true, then how do you think LINQPad, for instance, show all the generated SQL when I run a C# program with an EF ObjectContext? Do you think it also just has some smart engineering similar to TracingProvider to get that to work?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.