Ask Paula!

...bringing you notes from the field...

  Home  |   Contact  |   Syndication    |   Login
  147 Posts | 5 Stories | 133 Comments | 0 Trackbacks


Copyright © 2008-2018 Paula DiTallo

Tag Cloud


.NET Development

Enterprise Integration

Entertainment - Games

Java Development

Mobile/PDA Development

Professional Affiliations

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:

posted on Tuesday, June 14, 2011 4:22 PM