view generated SQL for Entity Framewok SaveChanges command in Visual studio?
问题 I can see the SQL generated by Entity Framework for select operations in Visual studio, but not for insert, update and delete. how can I see the SQL generated for "DataContext.SaveChanges" command in Visual studio while debugging? 回答1: If you have visual studio ultimate you can see the updates and inserts in intellitrace. Just put a breakpoint right after SaveChanges is called. http://www.youtube.com/watch?v=fLBpZNXs-Lw If you are using it on a web project you could also use mini-profiler.