从Web服务而不是datatable应该返回什么? [英] What should be returned from web service instead of datatable?
问题描述
我已经创建了一个Web服务,我需要从函数返回多个记录。因为我使用datatable,但发现,因为它不能被序列化。所以我们不能使用它所以我使用数据集而不是datatable。
我的服务将在PHP中使用。我不确定他们(PHP开发人员)是否能够从我的数据集(从我的webservice函数返回)获取数据。
I have created a web service in which i need to return multiple records from a function. For that I used datatable, but found that as it cannot be serialized. So we can't use it. So I used dataset instead of datatable. My service is going to be used in PHP. I am not sure that they (PHP developers) will be able to get data from my dataset (returned from my webservice's function) or not.
请建议我应该返回。数据集还是有其他更好的选择?
Please suggest me what I should return. Dataset or is there any other better option available?
谢谢。
推荐答案
p>我将创建一个可序列化的类,可以表示数据集中的每个记录,然后返回该集合。
I would create a serializable class that can represent each record in the data set and then return a collection of that.
这篇关于从Web服务而不是datatable应该返回什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!