10

I am trying to use the mvc-mini-profiler with MVC3 and keep getting the following error

Unable to determine the provider name for connection of type 'MvcMiniProfiler.Data.ProfiledDbConnection'

Below is the code that I am using to try and instatiate my Context.

DbConnection conn = new MySqlConnection(
    ConfigurationManager.ConnectionStrings["ConnString"].ConnectionString);

var profiledConnection = MvcMiniProfiler.Data.ProfiledDbConnection.Get(conn);
return new DB(profiledConnection);

And here is the DB Context Class.

public class DB:DbContext, Stats.Data.IDB
{
    public DB(DbConnection conn)
        : base(conn, true)
    {

    }...
Rup
  • 33,765
  • 9
  • 83
  • 112
runxc1 Bret Ferrier
  • 8,096
  • 14
  • 61
  • 100

1 Answers1

2

As of version 1.5 this is now supported see: http://code.google.com/p/mvc-mini-profiler

The step to configure it are listed here: Using mvc-mini-profiler database profiling with Entity Framework Code First

Community
  • 1
  • 1
Chance
  • 1,317
  • 2
  • 12
  • 18