开发者

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

I created a Silverlig开发者_运维百科ht 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?


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜