1

I have created a EntityFramework ORM. I try to add a new controller using a wizard;

enter image description here

and get the following error:

enter image description here

How can I solve this? I have tried to clean and rebuild, but it didn't help.

1 Answer 1

1

Based on this site;

You will get this if you are using Entity Framework and have the edmx/app.config in a seperate place from your main website. The connection information within the app.config file needs to be copied/the same as the connection information contained within the web.config on the root of your website. Set that up and this error will go away.

Also check Compiler error using EF4 as a separate project than my MVC project

Sign up to request clarification or add additional context in comments.

2 Comments

then coping the connection string, and I can leave the EF edmx in my Dal project?
Just copy your app.config connectionstring and paste your mvc web.config.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.