In an existing C# 2010 application, I want to add linq to sql statements to connect to a sql server 2008 database. When I setup this linq to sql database, I want to be able to setup the connections to the
database using the app.config file.
I have seen that when you setup the database connection this way, the default database is used. Basically this is ok when you database on the same database. However, when you move from a unit testing database to a user acceptance and/or a production database there is a problem since the database connection is hard coded in the aqpplication.
Thus can you tell me and/or show me with code how to prevent this problem from occuring?
database using the app.config file.
I have seen that when you setup the database connection this way, the default database is used. Basically this is ok when you database on the same database. However, when you move from a unit testing database to a user acceptance and/or a production database there is a problem since the database connection is hard coded in the aqpplication.
Thus can you tell me and/or show me with code how to prevent this problem from occuring?