Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

MiniProfiler and SqlMembershipProvider

I am trying to get any DB queries that happen when using the SqlMembershipProvider to show in MiniProfiler but I can't think of any way to swap out the SqlConnection is uses with a ProfiledDbConnection as it seems to do everything internally. Anyone have any ingenious ideas?

like image 994
Martyn Avatar asked May 01 '13 10:05

Martyn


1 Answers

You could download the source (freely avaliable) for the ASP.Net SQL Providers here, read more about it here, Scott Gu published tons of whitepapers in this article about the provider model. internal to the assembly is a SQLConnectionHelper that you can update to use the ProfiledDBConnection instead. This would give profiling to all the providers using that class, all thats left is to change your .config file to use the new provider instead.

like image 178
almog.ori Avatar answered Nov 12 '22 16:11

almog.ori