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
2010-03-20 13:58:13
I was hoping for something really simple like ObjectQuery.ToTraceString() but obviously nothing similar exists.I will take a look at EFTracingProvider. Thanks!
wpfwannabe
2010-03-20 14:49:46
+1
A:
The simplest way is using sql server profiler, it will show you what is executed against the db.
Paul Creasey
2010-03-20 13:59:11
Unfortunately, I am using SQL Express and won't be moving to full SQL Server.
wpfwannabe
2010-03-20 14:47:14