我有一个列表框,用户可以从列表中选择如果Towns,我希望能够基于列表中的选定项目来构建LINQ查询,例如,建立一个动态的LINQ查询
Dim ddlTowns As ListBox = CType(Filter_Accommodation1.FindControl("ddlTowns"), ListBox)
If Not ddlTowns Is Nothing Then
For Each Item In ddlTowns.Items
If Item.Selected Then
'// Build query
End If
Next
End If
我已经研究LinqKit,因为它似乎是能够做什么,我需要,但我不能后试图取得任何进展小时。在VB中我找不到任何有意义或可用的东西。
我最终使用了比谓词简单得多的东西...... – David 2011-03-16 00:46:12