I am using entity framework and ASP.NET MVC 5 and WEB API 2 to build an application
Answer:
My solution is split into two projects;
- A class library that includes my data model (.edmx) file and a few custom interfaces
- The 'container' MVC project that references the class library above
No connection string named 'MyEntities' could be found in the application config file.
Answer:
This happens because the class library (where the .edmx file) is not your startup / main project.
You'll need to copy the connection string to the main project config file.
Incase your startup / main project does not have a config file (like it was in my Console Application case) just add one (Startup project - Add New Item -> Application Configuration File).
This is amazing and awesome
ReplyDelete.Net Online Training