我在 Web 方法中返回列表时遇到问题。这是代码
<WebMethod()> _
Public Function getTags(para_parents As String) As List(Of getTypeDetailsByParentName_Result)()
Dim context As New PPEntities
Return context.getTypeDetailsByParentName(para_parents).ToList()
context.Dispose()
End Function
错误是
“System.Collections.Generic.List(Of SaftyonRoad.getTypeDetailsByParentName_Result)”类型的值无法转换为“System.Collections.Generic.List(Of SaftyonRoad.getTypeDetailsByParentName_Result) 的一维数组”