请纠正错误 [英] Plese correct the error
本文介绍了请纠正错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我收到此错误
在配置中找不到指定的命名连接,或者不打算与EntityClient提供程序一起使用,或者无效.
i got this error
The specified named connection is either not found in the configuration, not intended to be used with the EntityClient provider, or not valid.
推荐答案
您应该在自己的条目中有一个条目看起来像这样的配置文件:
You should have an entry in your config file that looks something like this:
<add name="MyEntity" connectionString="metadata=res://*/DataAccess.EntityFramework.MyEntities.csdl|res://*/DataAccess.EntityFramework.CodeStashEntities.ssdl|res://*/DataAccess.EntityFramework.CodeStashEntities.msl;provider=System.Data.SqlClient;provider connection string="data source=MyDataSource\SQLExpress;initial catalog=MyCatalog;Integrated Security=SSPI;multipleactiveresultsets=True;App=EntityFramework"" providerName="System.Data.EntityClient" />
您代码中的实体框架连接应使用开头提供的名称.
Your entity framework connection in your code should use the name supplied at the start.
这篇关于请纠正错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文