After creating an entity model from a database or creating a database from an entity model, the Entity Framework automatically generates a database connection string that is stored in the App.config file of the project that contains the model. This configuration file is not accessible to other projects that wish to use the entity model.
The solution is to simply copy the
connectionStrings section in the App.config file to the other project’s configuration file, i.e. Web.config for ASP.NET pages.