Geeks With Blogs

News Copyright © 2008-2013 Paula DiTallo
Ask Paula! ...bringing you notes from the field...

The chances are pretty high that you are creating a multi-tiered application with a solution that may be calling several different projects, one of which is the ADO.NET Entity Framework DAO-layer. In order for the entity frame work to work outside the immediate project that its been created under, you'll have to import the connection string built by the EF wizard at create time to your other project's application or web config file.

Here's an example.  I have two projects under a single solution, 1 project is a test driver console app called RetroCar.Test.EF.  This project depends on a data access layer project called: RetroCarEntityFramework.  Even though RetroCar.Test.EF is just a simple unit test console app without an obvious need for a config file, I still need to import the connection string used in RetroCarEntityFramework in order for the test driver application not to bomb out.  The best way to do this is just go to the project RetroCar.Test.EF and add a new application config file item, then cut and paste the connection string from RetroCarEntityFramework into that. Recompile. This should fix the trouble.

If your woes drill down in the trenches of EF further, check out this thread on the topic:

http://social.msdn.microsoft.com/Forums/en/adodotnetentityframework/thread/f5904b4d-b2f8-421e-90de-339f93959533

Posted on Tuesday, June 14, 2011 4:22 PM Practical Answers , .NET | Back to top


Comments on this post: Why do I get the error: Specified Named Connection is either not found in the configuration for the EntityClient Provider?

No comments posted yet.
Your comment:
 (will show your gravatar)
 


Copyright © Paula DiTallo | Powered by: GeeksWithBlogs.net | Join free