Pre Exam Test Practice (SSC | Banking | IAS | GATE | State Level | CLAT | Railways | Insurance | Teaching Exams | NDA | Defence | IES |State Exam )

Organizational Research By

Surprising Reserch Topic

linq to sql set connection string dynamically based on environment variable


linq to sql set connection string dynamically based on environment variable  using -'asp.net,linq,linq-to-sql,connection-string'

I need to set my connection string for Linq to Sql based on an environment variable.  I have a function which will return the connection string from the web.config based on the environment variable, but how do I get Linq to always use this "dynamically created" connection string (preferably without having to specify it every time)?

I know I can specify the connection string using the constructor, but how does that work when using the datacontext in a LinqDataSource?
    

asked Sep 21, 2015 by deepak07.s
0 votes
17 views



Related Hot Questions



Government Jobs Opening


...