Moosa Arbeed

Moosa Arbeed

  • NA
  • 38
  • 2.4k

How can I have 2 connection strings in Windows Forms

Dec 1 2019 6:11 AM

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)