MvcMiniProfiler profiling web app and lower layers

前端 未结 2 1472
粉色の甜心
粉色の甜心 2020-12-14 04:10

I have MiniProfiler set up and working in my ASP.NET MVC app. My controllers make calls via WCF to a BLL which in turn talks to the database. I would like to see profiling f

2条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-14 04:21

    That's one method, but in order to get the reference to the libraries you would have to add references in the lower layers for MvcMiniProfiler anyway.

    What I did in this very same situation is to take advantage of the global access point that MiniProfiler provides as a singleton. So, I just added the reference in the lower levels (deleted the stuff relative to MVC, such as the views) and just used MiniProfiler.Current as if I were on the upper layers.

    It works like a charm. :)

提交回复
热议问题