How to change the Database Connection of LINQ to SQL Class
Introduction Its very common that couple of developers are working on a single project. Me and one of my friend are also working on a .NET project. We are using LINQ to SQL class to query on the database. This is a desktop Windows Form project and we are maintaining our code as dumbest way possible. That is, when i update on any part, i just mail him the file and he replaces the file. So far so good. Problem statement But when I sent him my project, he couldn't run the database queries. Because the connection string embed on the DataContext.dbml class was not changed. He couldn't find a good way to change the connection string value. So I was searching for a better solution, and at last I found it today. Solution 1. Double click on the DBML file of your project. 2. Now right click on the work area of the DBML file (Start sign in the image) 3. Expand the connection property and check the Data Source value. in my case, it is 'Magicbox' since it is my machin