How can we change the underlying database for Linq based WebApp ?
for example:
When we release our web application, say to release from production, if using ADO.NET,
it is as simple as modifying connection string in web.config to point towards the live Database in use. The databases are almost identical, other data stored..
What and how do we change unerLying Database when using LINQ ?
Note ; Using c#
thanks
I would highly recommend in your app instantiating the data context with the connection string overload. I create a helper component that does:
That way, I only have one place to change the way the context is instantiated, or I can change the config file to switch databases. Or, the create method can take some input to determine the connection.