broke
broke

Reputation: 8312

How do I fix this weird entity framework error?

Got this error message while trying to configure an entitydatasource in the designer:

enter image description here

My .edmx file is in a class library in the same solution. I added the necessary DLL's and copied the connection to the web.config. The weird part is that I can query the database, and get data just fine, so I know my connection string is correct. Has anybody come across this?

Upvotes: 1

Views: 1109

Answers (2)

BizApps
BizApps

Reputation: 6130

Try this steps:

Rebuild your solution

Go to your class library app.config

Copy the connectionstring of your created EDMx and paste it to

web.config connectionstring section of your asp.net project ..

I also got this error before and this is what i did.

If this does not work try to delete your edmx file(and its connectionstring on app.config) and recreate it. Then follow the above steps again.

Best Regards

Upvotes: 1

usr
usr

Reputation: 171246

Can you delete and recreate the edmx file? This will fix things (although this is a blunt measure).

Upvotes: 1

Related Questions