问题
Is it possible to use the mini profiler in service stack with the razor views? It looks like the documentation only shows the profiler when using the json html report view.
回答1:
Yes you can include it using the same MVC include but include it .AsRaw()
so it doesn't get HTML encoded, e.g:
@ServiceStack.MiniProfiler.Profiler.RenderIncludes().AsRaw()
Example taken from this RazorRockstars template.
来源:https://stackoverflow.com/questions/12586343/servicestack-net-mini-profiler-in-razor-view