I have started to build a WPF application in MVVM architecture (using Prism infrastructure).
I need the WPF application to connect to several different WCF services.
I am a bit puzzled, because I could not find any samples of such behavior on the net.
I have found some Silverlight+Prism samples that connect to WCF services, but they always do so asynchronously.
Is there a reason for this ? (my services are all ‘sync’).
Silverlight only supports async WCF calls so that is why all those samples do it that way.
There’s nothing in Prism that prevents you from making synchronous WCF calls but you will not be able to multi-target those modules for Silverlight. In terms of UI (even in WPF) you’re probably better off making those calls asynchronously.
Whether you have implemented your services sync or async is not really relevant to the client anyway – when generating your client proxy you can generate async Begin/End pairs for each operation.