Miniprofiler and Devart OracleConnector


#1

Hi,

I took today the latest version 2.0.2 and while the UI profiling works like charm, thank you, but for some reason I could not find a way to set the DB profiling at all.

The thing is I am using Devart’s Oracle connector 6.8 and EF code first (EF is 4.3) with MVC 4.

When setting the MiniProfilerPackage.PreStart() I am clueless on what to do to give it the right DbConnection that i can get from Devart. If i do:

var conn = new OracleConnection(“connection string here”); var profiled = new ProfiledDbConnection(conn, MiniProfiler.Current);

MiniProfilerEF.Initialize();

I keep getting this error:

Unable to cast object of type ‘StackExchange.Profiling.Data.EFProfiledDbConnection’ to type ‘Devart.Data.Oracle.OracleConnection’.

Is there any possibility to make this combination work?

Thank you for this great tool.


#2

are you using the MiniProfiler.EF nuget package? it includes all the magic needed to profile EF