views:

336

answers:

2

Is there a simple way to view the machine generated SQL for SaveChanges() on an Entity Framework context?

+1  A: 

Look at EFTracingProvider. If you use SQL Server, you can use SQL Profiler or free AnjLab SQLProfiler.

LukLed
I was hoping for something really simple like ObjectQuery.ToTraceString() but obviously nothing similar exists.I will take a look at EFTracingProvider. Thanks!
wpfwannabe
+1  A: 

The simplest way is using sql server profiler, it will show you what is executed against the db.

Paul Creasey
Unfortunately, I am using SQL Express and won't be moving to full SQL Server.
wpfwannabe