I have a .NET solution containing two projects:
- ASP.NET MVC Project, 'Website'
- Class Library, Models
The Models project contains the Linq-to-SQL data context along with several partial classes that extend database objects.
The connection string is defined in the web.config file of the Web site project.
However, the Models project seems to have its own app.config, where the database connection is defined separately.
This means that if the connection string changes, I will have to update both projects.
Is there a way that I can centralize the connection string in one place and still use both projects?
Jonathan
source share