Asp.net 亚音速网络服务
我试图让亚音速运行在一个网络服务的工作 我不知道如何返回数据。我只在返回任何值而不是值时在结果中获取单词Object。我错过了什么Asp.net 亚音速网络服务,asp.net,vb.net,web-services,subsonic,Asp.net,Vb.net,Web Services,Subsonic,我试图让亚音速运行在一个网络服务的工作 我不知道如何返回数据。我只在返回任何值而不是值时在结果中获取单词Object。我错过了什么 <WebMethod(Description:="Method to retrieveCptCode subsonic List")> _ Public Function GetSubCptCodes() As CPTCodeCollection Dim coll As CPTCodeCollection = New CPTCodeCollec
<WebMethod(Description:="Method to retrieveCptCode subsonic List")> _
Public Function GetSubCptCodes() As CPTCodeCollection
Dim coll As CPTCodeCollection = New CPTCodeCollection()
Dim qry As Query = New Query(CPTCode.Schema)
coll.LoadAndCloseReader(qry.ExecuteReader())
Return coll
End Function
_
公共函数GetSubCptCodes()作为CPTCodeCollection
Dim coll As CPTCodeCollection=新CPTCodeCollection()
Dim qry As Query=新查询(CPTCode.Schema)
coll.LoadAndCloseReader(qry.ExecuteReader())
返回科尔
端函数
亚音速+网络服务有一些缺点需要注意。我认为最成功的方法不是直接返回亚音速对象,而是使用类似于return coll.todata()的方法。
米奇解释了一些陷阱:
该线程讨论使用WCF而不是“旧web服务”模型