Search code examples
silverlight-4.0wcf-ria-services

WCF RIA Services: how can I explicitly set which entities should be generated to the client?


I created a Silverlight WCF RIA enabled application and added a model and a LinqToEntitiesDomainService to the web project.

I want to expose all (or some) of the entities in my model, even tho there is no Select queries available for it in my model.

Is there such a way?


Solution

  • RIA generates entities based on the following rules. Entities are visible if:

    1. They are returned from a query operation (in an IQueryable, IEnumerable, or singular)
    2. They can be reached from an entity returned from a query through properties marked with the [Include] attribute

    Entities in that latter category may not get EntitySets generated for them in the DomainContext, but should still be generated on the client.