开发者

WCF RIA SERVICE How many object are sent across network

I have Collection of objects. They are have reference to the same object. Is it one object will be send across network?

UPD Hello. I have Collection of objects. They are have开发者_JS百科 reference to the same object. Is this same object will be send across network in one instance or for each object in Collection?(Collection is send too)


Each object is sent only once.

For example, you have a parent-child set of objects. Five of the child objects refer to the parent. When sending the set of children to the client, the parent object is serialized into the response only once.

The [Key] attribute is used to identify an object as unique. Unique objects are serialized once per request/response. The WCF RIA client library unpacks the parent object from the response and re-establishes the parent-child relationship using the information in the [Association(...)] attribute.


If you send the collection , all objects are sent across the network. If your doubt it's about objects size, you can use JSON protocol to exchange data instead of XML.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜