tags:

views:

63

answers:

2

Hi,

I created a connection using the server explorer, and dragged my entire database over (all tables) to the designer.

I want linq to use my connection string in the web.config when I deploy it, how do I make it do this instead of using the connection string created in the server explorer?

+1  A: 
YourContextClass context = new YourContextClass(ConfigurationManager.ConnectionStrings["yourconectionstringid"].ConnectionString);
Gregoire
A: 

this is a good tutoral on Linq-sql-connection-strings

http://www.west-wind.com/weblog/posts/203567.aspx

Jambobond