Here is my scenario...I have a WPF app that talks to a WCF service.
The connection string settings are in the WCF service. The WCF service can be deployed to two different web sites, one for QA and one for PROD (each with its own URI).
I want my WPF app to be able to be run using QA data or PROD data. Basically, I would pass a parameter on startup to the WPF app which would be QA or PROD.
What I would like to do is deploy the exact same WCF service code to the QA and PROD websites with the only difference being the values of the connection strings in the respective web.config files.
I would then need a way to have a factory pattern in the WPF app that would return the WCF interface (proxy) based on the QA/PROD parameter passed in.
I need to make sure in the WPF app that the WCF interface (proxy) is viewed as the same type in both the QA and PROD reference.
After all this, the result would be...if a user started the WPF app and passed QA, each call to the WCF service would return QA data and if they passed PROD, each call to the WCF service would return PROD data.
I could simply pass QA or PROD as a parameter to each WCF service method, but that seems crude. Since WCF is stateless and has no constructor, I need to find a more flexible solution.