我的连接字符串如下:
<add name="RollCallDBEntities" connectionString="metadata=res://System.Engine/RollcallNS.csdl|res://System.Engine/RollcallNS.ssdl|res://System.Engine/RollcallNS.msl;provider=Devart.Data.Oracle;provider connection string="User Id=user;Password=password;Server=127.0.0.1;Direct=True;Sid=ORCL"" providerName="System.Data.EntityClient" />
我的代码如下:
using (var db= new RollCallDBEntities()) //ok
{
var query = db.TBL_ROLLCALL.ToList(); //Unable to load the specified metadata resource.
}
我的程序集:
System.Engine
有人有什么想法吗?
这些链接没有解决我的问题:
MetadataException: Unable to load the specified metadata resource
entity framework Unable to load the specified metadata resource
Entity Framework: Unable to load the specified metadata resource
Unable to load the specified metadata resource
最佳答案
我遇到了这样的异常。问题是我重命名了我的 .edmx
文件并忘记更改 EF Web.config
文件的连接字符串中的名称:
metadata=res://*/MyModel.csdl|res://*/MyModel.ssdl|res://*/MyModel.msl;
关于c# - 系统.Data.MetadataException : Unable to load the specified metadata resource,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18351898/