我修改了一个函数,该函数从存储过程返回强类型的产品 Ilist(来自 Web 搜索表单)。
由于存储过程的复杂性,我已将其更改为返回产品类别以及使用产品结果。我可以将它放入另一个强类型 ilist,但对于我的生活,我无法返回这两个 ilist。
Unfotunatley 在阅读了数百篇帖子之后,我的天赋已经耗尽,似乎使用 linq 是可能的,但我宁愿不这样做,因为我在那里的知识更少。
是否可以将 ilists 放入某种集合中并将它们返回以用作 ilists?
如果没有,还有其他方法吗?我可以再次调用存储过程,但调用两次会很昂贵。
'Code Behind
Dim products As List(Of Product) = Dal.SearchProducts(st)
'Dal
Public Shared Function SearchProducts(ByVal searchstr As String) As List(Of Product)
Dim ProdList As List(Of Product) = New List(Of Product)()
Dim CatList As List(Of Category) = New List(Of Category)()
......
Return Prodlist and Ilist please