1

I would like to know how can I change the connection string dynamically from C# in run time. I have 3 connection string in the App.config, I would like to know how can I change one of the connections dynamically.

P.S I use Ado.NET , Entity Framework.

3
  • 1
    Using code first or Entity first approach? Commented Jan 2, 2013 at 10:57
  • 1
    Did you have a look at ConnectionStringBuilder? Commented Jan 2, 2013 at 10:58
  • Thanks all of you guys I solved the problem with the help of Anandkumar Commented Jan 2, 2013 at 11:27

1 Answer 1

2

Every time you want to change the connection string just you change the main connection string in App.Config file.

Reference

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.