I am working on a C# 2010 web form application that uses linq to sql connections. In the various *.dbml files that are used, most of the .dbml files use the following connection string:
ConnectionString1 (Web.config), that points to the web.config file.
However in one of the situations, one .dbml file points to
DBConnectionStrings2 (Settings).
Thus can you tell me where the DBConnectionStrings2 (Settings) is referring to? What is the settings that are being referred to?
Loading
Jignesh TrivediPosted Jul 8, 2012, 11:50 PM
DataContact Also Take connection string as Argument.
DataContext db = new DataContext(ConnectionString);
So I think this will help you change connection dynamically.
Please refer
http://msdn.microsoft.com/en-us/library/bb350721.aspx
http://goneale.com/2009/03/26/untie-linq-to-sql-connection-string-from-application-settings/
hope this will help you.