Switching between dbs in LINQ to SQL

Joined
Jan 10, 2007
Messages
43,898
Location
In The Machine
I am trying to get my mind around LINQ, and for us the big thing will be LINQ to SQL.* I've been reading in the MSDN online docs, which are helpful, but I'm not seeing exactly what I want at the moment.* And honestly the big problem, for me, is working under a deadline.* I've only got so much time to finish this project and spending a lot of time reading about LINQ to try and understand it, plus then add in LINQ to SQL so I can get that working, leaves me feeling guilty.* Basically, I've got to get this done

*********** NOW!!!

This leaves me with the feeling that I cannot take the time to learn this when I can do the same thing faster just using ADO.NET.

However, I would still like to learn LINQ to SQL, but cannot find some answers to my basic questions.* For example, we have both production and test databases.* Structurally they are identical.* In our code we might to make it possible for developers to be able to switch between production and test databases, but I cannot see how that can be done with LINQ to SQL.* In the MSDN online help it speaks of using the O/R Designer and getting a connection to a database that way, so that you can access the stored procedure and that gets you the DataContext (and I hope that I am understanding this correctly).* That's nice, but how do I switch between my test and production databases that way?* With ADO.NET it would be a simple task of changing the connection string to the SqlConnection object.* I do not have a clue as to how to do that with LINQ to SQL.​


More...

View All Our Microsoft Related Feeds
 

Similar threads

D
Replies
0
Views
933
Dante Havenaar
D
D
Replies
0
Views
710
Dante Havenaar
D
D
Replies
0
Views
326
Dante Havenaar
D
G
Replies
0
Views
181
Gary D. Henderson
G
Back
Top