Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

My connection strings are as follows:

<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=&quot;User Id=user;Password=password;Server=127.0.0.1;Direct=True;Sid=ORCL&quot;" providerName="System.Data.EntityClient" />

my code are as follows:

using (var db= new RollCallDBEntities()) //ok
{
   var query = db.TBL_ROLLCALL.ToList(); //Unable to load the specified metadata resource.
}

my assembly:

System.Engine

Anyone have any ideas?

these links did not soled my problem:
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

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
335 views
Welcome To Ask or Share your Answers For Others

1 Answer

I was getting an exception like this. The problem was that I renamed my .edmx file and forgot to change the name in EF Web.config file's connection string:

metadata=res://*/MyModel.csdl|res://*/MyModel.ssdl|res://*/MyModel.msl;

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...