view generated SQL for Entity Framewok SaveChanges command in Visual studio?

前端 未结 4 701
礼貌的吻别
礼貌的吻别 2021-01-05 00:02

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 \"DataCont

4条回答
  •  甜味超标
    2021-01-05 00:32

    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.

    http://miniprofiler.com/

提交回复
热议问题