views:

102

answers:

2

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  A: 

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

Devart
+1  A: 

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

Craig Stuntz
it's a winforms app actually Craig
Greg

related questions