EF 查看生成的sql语句

_context.Database.Log = new Action<string>(q => System.Diagnostics.Debug.WriteLine(q));

原文地址:https://www.cnblogs.com/13142088/p/7266868.html