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(
ConfigurationManager.ConnectionStrings[“default”].ConnectionString,
SqlServerDialect.Provider) { ConnectionFilter = x => new ProfiledDbConnection(x, Profiler.Current) }
);
Now where can I see the result since I’m not in a MVC page?
Thanks
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?
Thanks
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()