1. Welcome Guest! In order to create a new topic or reply to an existing one, you must register first. It is easy and free. Click here to sign up now!.
    Dismiss Notice

Switching between dbs in LINQ to SQL

Discussion in 'Microsoft News' started by NewsBot, Apr 21, 2008.

  1. NewsBot

    NewsBot I Got News

    Joined:
    Feb 8, 2006
    Messages:
    1,813
    Operating System:
    Windows Vista Home Premium
    <div align='LEFT'>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

    <!--sizeo:6--><span style="font-size:24pt;line-height:100% <!--/sizeo-->*********** NOW!!!<!--sizec--><!--/sizec-->

    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.




     

Share This Page