1、监听EF执行sql的方式
public JDDbContext() : base("name=JDDbContext") { this.Database.Log += c => Console.WriteLine($"sql:{c}"); }
2、查看EF对象上下文监听对象的状态