EF中打印出执行sql语句时间:2023-03-09 07:57:29 不用非得去 SQL Server Profiler 中查看了 方法如下: dbContext.Database.Log+=c=>Console.WriteLine(c)