参考自:http://www.cnblogs.com/chenwolong/p/MiniProfile.html

直接从Nuget上下载
MiniProfiler

MiniProfiler.EFX   这个X根据EF版本而定

然后在视图页加上
MiniProfiler EF的SQL性能监控工具 超级实用

@using StackExchange.Profiling;
@MiniProfiler.RenderIncludes()

然后在Global.asax中添加三处红框

MiniProfiler EF的SQL性能监控工具 超级实用

然后在Web.config中的<system.webServer>节点下添加下列配置

<handlers>
      <add name="MiniProfiler" path="mini-profiler-resources/*" verb="*" type="System.Web.Routing.UrlRoutingModule" resourceType="Unspecified" preCondition="integratedMode" />
</handlers>

 

大功告成,亲测有效
效果图如下:

MiniProfiler EF的SQL性能监控工具 超级实用

 

相关文章:

  • 2021-07-30
  • 2021-11-17
  • 2022-02-02
  • 2021-04-20
  • 2021-08-27
  • 2021-05-09
猜你喜欢
  • 2022-01-21
  • 2021-08-12
  • 2022-12-23
  • 2021-10-12
  • 2021-05-23
  • 2022-12-23
相关资源
相似解决方案