My DbContext ctor looks like this:
public class FnordDbContext : DbContext { public FnordDbContext() : base("Fnord") { } }
And my mvc-mini-profiler bootloader looks like this:
var sqlConnectionFactory = new SqlConnectionFactory(ConfigurationManager.ConnectionStrings["Fnord"].ConnectionString); var profiledConnectionFactory = new MvcMiniProfiler.Data.ProfiledDbConnectionFactory(sqlConnectionFactory); Database.DefaultConnectionFactory = profiledConnectionFactory;
If I delete the connection string in my DbContext ctor, I get the profiling as expected. But I do not want to specify my connection string in accordance with the EF standard. What do I need to change to get mvc-mini-profiler to work with my use of DbContext?
half-ogre
source share