我想在C#中實現動態搜索功能。我的搜索會像如何使用C#和Linq實現動態搜索功能?
Attribute operand Value === > Height > 170
像上面的搜索列表的推移動態地爲想過濾數據用戶可以添加儘可能多的。和屬性匹配我的列名可能來自SQL DB中的不同表。
實現這種搜索的最佳方式是什麼?我對Linq非常陌生,我試圖去了解http://www.albahari.com/nutshell/predicatebuilder.aspx
我該如何動態構建查詢或什麼是這些易於維護的搜索的最佳方式?
實施例:
Attribute operand Value === > Height = 170
Attribute operand Value === > Altitude > 40000
Attribute operand Value === > temperature < 105
一切都是定製到用戶,並建立在運行時。
實現此目的的最佳方法是什麼?
請您可以在實施的初始階段顯示一些代碼 – 2013-03-09 12:31:29
。只是想向你們確認什麼是最好的方法? – user2067567 2013-03-09 12:50:05