I think your confusion may lie in the fact that the Visual Studio wizard to add the RIA service assumes that you will use EntityFramework for your data. I donβt think you want to create an EF model from data from the second WCF service. Instead, create your RIA service to get directly from the DomainService and override the methods you need. In each request method, simply query the remote service and return the result to the Silverlight client. In order for the RIA service magic code generation to work, you need to define a set of DTO objects in your application that wrap the results from the remote WCF service.
Here is a small example. Note. I just did it to illustrate what I mean. You will need to put the calls in the actual service you are using and build error handling, input validation, etc.
namespace YourApp.Web { [EnableClientAccess] public class WcfRelayDomainService : DomainService { public IQueryable<Restaurant> GetRestaurants() {
Hope this helps! See How to Configure RIA Services with Silverlight 4.0 and Without EF for more tips.
source share