开发者

what type of collection suits to webservices at .Net?

wanna ask for your opinion. What would be the best object (Array, List<>, C开发者_如何学编程ollection,...) used in webservice when returning list of business objects. Like a list of customer or history list.

Some ideas:

  • because I want minimize amount of data transafered between client and server
  • because I want simplify xml serialization
  • I dont expect any extra functionality at server side, just simple select

Any tip, opinion most welcome. Cheers, X.


I would use List of the objects you want to return. You can then specify if you want to to appear as array of T or List at the client (I would use List).


All collections are passed in the same manner. I pass as Lists<> because it is easy to manipulate before serilization.

You can configure the consumer to use whatever you want, and it should be deserialized properly.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜