1

how can I swap Entity Framework connection strings easily when I test on different servers (i.e. different databases) - at the moment it is a bit tedious going into the design parameters and trying to swap back and forth each time I change.

2 Answers 2

2

Use the ObjectContext constructor that takes a name of the app.config entry and hold several app.config entries for the necessary databases.

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

Comments

2

Is this a web app? If so you can use web.config transforms.

1 Comment

it's a winforms app actually Craig

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.