Entity framework 使用LinqPad查询Ef上下文:参数异常
我在linqpad中添加了Ef连接,如下所示Entity framework 使用LinqPad查询Ef上下文:参数异常,entity-framework,entity-framework-4,linqpad,Entity Framework,Entity Framework 4,Linqpad,我在linqpad中添加了Ef连接,如下所示 正如您所看到的,连接已成功添加,但当我想查询此连接时,会出现以下异常 The specified named connection is either not found in the configuration, not intended to be used with the EntityClient provider, or not valid. 它似乎与连接字符串连接,但如何解决它,我不知道。上下文在asp.net mvc项目中定义(没有单
正如您所看到的,连接已成功添加,但当我想查询此连接时,会出现以下异常
The specified named connection is either not found in the configuration, not intended to be used with the EntityClient provider, or not valid.
它似乎与连接字符串连接,但如何解决它,我不知道。上下文在asp.net mvc项目中定义(没有单独的数据访问项目),连接字符串像往常一样在web.Config文件中 1) 通过执行以下命令,查找LINQPad用于其配置文件的路径:AppDomain.CurrentDomain.SetupInformation.ConfigurationFile.Dump() 这为我返回了以下内容:C:\Program Files\LINQPad4\LINQPad.config
最新版本的LINQPad支持直接连接到具有DbContext或ObjectContext的项目。使用该连接类型,您可以在设置连接时指定app.config/web.config