I was using the Entity Framework Database First approach and it worked well when I generated the edmx file within the ASP.NET MVC project.
But because we need to adhere to the N-layering practice, I have created a ProjectName.DataModel class library and generated an edmx file there.
It no longer worked and returned an error “Unable to load the specified metadata resource”.
Craig Stuntz fully explained the source of error here.
So what I did to solve the problem was go to the config file and modified the part of Entity Framework generated connection string to this:
connectionString="metadata=<b>res://ProjectName.DataModel/Model.csdl|</b><b> res://ProjectName.DataModel/Model.ssdl|</b> <b>res://ProjectName</b><b>.DataModel/Model.msl</b>;
Noticed that I have removed the “*/” part. That did the trick.