2
Answers

How can I have 2 connection strings in Windows Forms

Moussa Arbid

Moussa Arbid

5y
473
1

I am building a Windows Form (WinForm) using Entity Framework 6, I should have 2 different connection strings.

  1. a connection string for development mode.
  2. a connection string for deployment.
how can I achieve that and easily switch between them?
I need this scenario to check if the Application is still in development mode (DEBUG), use the first connection string and if it is deployed, then use the second one.
Answers (2)