How to use WCF (Windows Communication Foundation) with Prism-MEF

Topics: Prism v4 - WPF 4
Oct 24, 2013 at 1:51 PM
Mostly I develop LOB application using Prism + MEF as a framework and WCF: the point is how to handle WCF project within such framework: should I treat WCF project as a regular Module meaning to use Exporting, Importing for registering and resolving classes and implementing IModule ...etc. or there is a specific way to handle WCF especially in Client-Server architecture
Oct 24, 2013 at 2:19 PM
Hi jivara,

You could write wrapper classes fir your wcf proxies and export them into the classes (ideally your viewmodels) to consume. They can be in a seperate class lib project. No need to treat it as a module per se!

Oct 24, 2013 at 4:51 PM
Hi gan_s,
Thanks for quick reply. Do you have any example showing this approach? if no could you kindly create one?
Oct 24, 2013 at 5:37 PM
HI Jivara,

I believe that you could find the following blog post by Guido Maliandi interesting, as it show an approach to consume WCF services in a Prism application.
Based on my understanding I think it follows a similar approach as the one mentioned by gan_s above.

Although the application is based on Silverlight the implementation should be similar for a WPF scenario.

I hope this helps,

Damian Cherubini
Oct 25, 2013 at 6:43 AM
Hi Damian,

Yes I meant the same thing as in the blog post you have mentioned above.