将NuGetGallery升级EF6之后,想让它在第一次访问时创建数据库,在EntitiesContext中注释了下面的代码:
static EntitiesContext() { // Don't run migrations, ever! //Database.SetInitializer<EntitiesContext>(null); }
结果运行时总是报错:
The connection is not of type 'System.Data.SqlClient.SqlConnection'
后来用nuget将Glimpse.EF43升级至Glimpse.EF6,问题就消失了
Uninstall-Package Glimpse.EF43
Install-Package Glimpse.EF6