I have a website project which includes several assemblies which are built separately. One of the assemblies is the EntityModel, which also has an app.config file with the connection string to the database.
The website project then brings that DLL into its own project. When I build the website assembly, I just copy the website folder to the server. The web.config connection string has a different database name on the live server, so I change that on the server and works fine.
However, the assembly which is included into the website project has already been built with a connection string that refers to my local DB name, not the production DB name.
What I would like to know is how do I ensure the assembly is using the correct DB connecting string in the app.config as it won't have 'visibility' of the changed DB name in the web.config.
I might be wrong but it seems the connection will be baked into the assembly which I don't want.