The specified named connection is either not found in the configuration, not intended to be used

今天用EF遇到一个问题, The specified named connection is either not found in the configuration, not intended to be used。。。。。。。

原因是我的EF中数据库连接字符串放到App.Config文件中, 而我另一个工程使用此工程时没有添加App.Config 或者Web.Config


解决办法:
在调用工程中添加App.Config, 或者Web.Config , 然后把EF工程中的连接字符串添加到此config文件里。
posted @ 2013-07-04 09:23  muzizongheng  阅读(191)  评论(0编辑  收藏  举报
如果我们时时忙着展现自己的知识, 将何从忆起成长所需的无知?