Using mvc-mini-profiler database profiling with Entity Framework Code First
问题 I'm using the mvc-mini-profiler in my project built with ASP.Net MVC 3 and Entity Framework code-first. Everything works great until I attempt to add database profiling by wrapping the connection in the ProfiledDbConnection as described in the documentation. Since I'm using a DbContext, the way I am attempting to provide the connection is through the constructor using a static factory method: public class MyDbContext : DbContext { public MyDbContext() : base(GetProfilerConnection(), true) { }