开发者

RIA Service doesn't pass child entity collections to client side

开发者 https://www.devze.com 2023-01-12 02:49 出处:网络
I have a self defined entity in RIA service called EntityA. It contains a EntityCollection of EntityB. I use three attributes on it.

I have a self defined entity in RIA service called EntityA. It contains a EntityCollection of EntityB. I use three attributes on it.

[Include]

[Composition] [Association("EntityA_EntityBs", "ID", "ID")] public EntityColle开发者_运维技巧ction EntityBs { get; set; }

Looks like the generated file (...g.cs) get all properties and also the collection, and the service indeed gets child collection attached when return. However, the client just has properties retrived without any child entities.....

I am wondering what I did wrong?

Thank you all


OK, I solved it.

It's caused by the association attribute. It should have the correct information:

[Association("EntityA_EntityBs", "ID", "EntityA_ID")] 
0

精彩评论

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