I'm confused on how to do what the title says.
Basically I have two connection strings in my config file, a production one, and a development one.
I have a simple class library project that is basically my data access layer, that I want to unit test. I don't want to run all the unit tests on my production database so I would like it to use a different connection string.
On startup and teardown of my tests project it will create the necessary tables and temporary data in my development database, while with my real project I would like it to use the production one.
In my Data Access layer class library do I just expose the DataContext or some method to switch modes (debug, production)? Then the only way I can think to change the connection string is through the DataContext.Connection.ConnectionString property...but I'm not sure if that is correct.
Any insight would on this would be great.