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

前端 未结 4 676
礼貌的吻别
礼貌的吻别 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:34

    Here's something really simple that I found:

    context.Database.Log = x => System.Diagnostics.Debug.WriteLine(x);
    

提交回复
热议问题