This is a mirror of official site: http://jasper-net.blogspot.com/

Re-using WCF service among several Silverlight applications

| Thursday, October 6, 2011
image_thumb_6D868CDC.png

This article is about creating WCF RIA service in class library assembly instead of in the Silverlight application. For unknown reason (at least for me) most, if not all of the Silverlight samples implement the service logic in the main Silverlight application project. But since MVVM is all about de-coupling and re-using, Those services should be implemented in class library and exposed by the application.

Press here to download demo solution. In this solution you will find a working service as shown above.
Creating the service in class library project

1 Open your application solution.
2  Add project of type 'Class Library' (Notice not to select 'Silverlight class library').
3 In the newly created project add an item of type 'WCF service'. This file extension is '.cs' and not '.svc'. Don't worry about it at the moment.

image_thumb_18C04201.png

Read more: Eran Sakal's blog
QR: creating-silverlight-wcf-ria-service-in-class-library-assembly.aspx

Posted via email from Jasper-net

0 comments: