Paolo ponzano - 429 - Jun 18, 2014

Hello Demis, I’ve a WPF application that makes use of SS for retrieving data from DB, was wondering to add sql profiling (when in debug) and I’ve defined this in my AppHost (on webserver) 

container.Register<IDbConnectionFactory>(_ => new OrmLiteConnectionFactory(
                SqlServerDialect.Provider) { ConnectionFilter = x => new ProfiledDbConnection(x, Profiler.Current) }

Now where can I see the result since I’m not in a MVC page?


You can just call the same pages that shows the MiniProfiler results and it shows all you the unseen results. So you would see the WPF requests.

paolo ponzano:

Excuse me, which page shows the miniprofiler result page? Can I also log on txt file in some way?

The same page you use to view any Mini Profiler results (i.e. for a normal web requests) shows you any “unseen” mini profiler results (i.e. your requests from WPF). 

You should be able to get the profiler JSON results with Profiler.ToJson() that you likely want to call just before Profiler.Stop() in the Global.asax Application_EndRequest()