Shimmy Weitzhandler
Shimmy Weitzhandler

Reputation: 104771

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?

Upvotes: 1

Views: 95

Answers (1)

Kyle McClellan
Kyle McClellan

Reputation: 2029

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.

Upvotes: 2

Related Questions