Prism+RIA problem

Topics: Prism v4 - Silverlight 4
Jul 2, 2011 at 9:44 AM

Hi, I can't get "Entity reference" in common service class library.

I use Prism4+Silverlight+WCF RIA Services. As we know, a Service can be implemented in one Prism module and be consumed by another module with the help of a common service interface class library. But my current problem is, it's not possible to get  "Entity reference" in common service class library.


For example, I created an interface IBookDataService in a common class library of "MyApplication.Common", now I want to declare an method of

 void GetCategories(Action<ObservableCollection<Category>> getCategoriesCallback);

but it's not possible because the type "Category" in unknown in current common class library, only Prism modules have "RIA Link" to RIA Services and get access to server side business entities by local proxy.


public interface IBookdataService
     //Category is unknown, because MyApplication.Common class library has no RIAService LINK to the web project.
     void GetCategories(Action<ObservableCollection<Category>> getCategoriesCallback);

Is there some way to solve my service problem? I really need the services to separate concerns of ViewModel in Prism modules. Thanks for your help.

Jul 4, 2011 at 8:54 PM


One possibility to fulfill your requirement would be to create a Services module, whose sole purpose would be to define the RIA link to RIA Servicse. Then, you could make your other modules depend on that module, and therefore access the proxy generated classes.

I hope you find this helpful.

Guido Leandro Maliandi

Jul 5, 2011 at 12:09 PM

The problem is solved by myself. Thanks for your reply anyway.

Jul 19, 2011 at 7:02 AM

What was the  solution?  Can you provide more information please?