Using mvc-mini-profiler database profiling with Entity Framework Code First

后端 未结 3 1171
醉酒成梦
醉酒成梦 2020-11-27 18:32

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 prof

3条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-11-27 19:12

    This error in my experience has always been an invalid connection string, or a lack of connection to the DB, like "A network service error occurred while connecting...".

    Also note that the DbContext just needs the "connectionStringKey" in the constructor, like

    public MyDbContext() : 
         base("MyConnectionName", true)
        { }
    

提交回复
热议问题