views:

455

answers:

1

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

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

+3  A: 

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.

Alex James
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 http://devio.wordpress.com/2010/01/28/tracing-sql-statements-generated-by-entity-framework/
devio