Sie Ste

Sie Ste

  • NA
  • 196
  • 179k

linq to sql

Nov 17 2012 5:35 PM
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 read 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?
Is there a link I can point to?

Answers (1)