I am learning Asp.net mvc 4 at work and modifying an asp.net mvc 4 project.
Currently, the connection to the database is set in the web.config of each project. The project uses entity framework which I am also still trying to understand (I come from a java Apache Wicket background).
What I want to do is have a property file for each environment(local, dev, test, production, etc..) and configure the connectionstring from the property file to use the database connection information affiliated for that environment.
I saw some topics on this already, Here and here. But I don't know Asp.net MVC enough to understand what C# class I should change the connection string in.
What is the best way to do this? I started off with using an external file for appSettings, but was stuck when I didn't know how to change the web.config dynamically using the appSetting key/value.
This application I am modifying has multiple projects, with multiple connection strings. I see the EF as an overloaded constructor to take a connection string, but I do not see where this constructor is used. So for now, I would just like to some how dynamically modify the connection strings. Where would I do this within the project?