SamSaffron/MiniProfiler — pull request #60 by Bunk (2012-08-11 21:44:20+00:00)
Title: Support for Adomd.net

I was unable to wire up support for Adomd.net with the current implementation of the mini profiler. There are dependencies on DbConnection, DbCommand, DbTransaction, etc. that are specific to SQL implementations only. Adomd.net utilizes IDbConnection, IDbCommand, IDbTransaction, and IDataReader.

The solution for me was to replace reliances on Db* implementations to their respective interfaces. To maintain backwards compatibility I created separate SimpleProfiled* implementations that users can use for MDX queries or any database connection that implements the IDb* interfaces.

Here's an example of how I use this for both SQL and MDX queries.

SQL
```csharp
var cmd = base.CreateCommand();
var profiledCommand = new ProfiledDbCommand(cmd, null, MiniProfiler.Current);
return profiledCommand;
```

MDX
```csharp
using (var connection = new AdomdConnection(_ssasConnectionString))
using (var profiled = new SimpleProfiledConnection(connection, MiniProfiler.Current))
{
profiled.Open();
return action(profiled);
}
```