Considering a Visual Studio 2010 solution with:
- A class library containing code-first Entity Framework 4.1 entities and DbContext;
- A default WCF project that references the entities class library:
How should the connection string for a remote SQL Server database be specified in the WCF project so that Entity Framework 4.1 will be able to access this database?
You need to add the connection string to the web.config of the WCF project.
It doesn’t matter that the EF is declared in a referencing assembly. The configuration is always loaded from the current process, which in this case is the WCF project.