鑑於follwing:LINQ到EF動態搜索具有多個屬性
SQL表:
Names
-----
Id (int)
FirstName (varchar)
LastName (varchar)
NameProperties
----------
Id (int)
NameId (int) FK to Names Id
PropType (int)
PropValue (int)
每個名稱可以有多個NameProperties
現在我searchCriteria類是如下
public string FirstName { get; set; }
public string LastName { get; set; }
public List<KeyValuePair<int,int>> Properties { get; set; } Corresponding to a list of PropType ProValue
當我有多個PropType時,如何使用linq搜索EFPropValues?
好的......你可以添加更多的細節,你想在這裏實現什麼? – NiK 2012-03-28 00:35:21
@NiK我試圖通過給定某個名字和姓氏名稱來搜索PropType和PropValue列表 – 2012-03-28 00:37:09
「Any」擴展名不適合你嗎?你能證明你所嘗試過的嗎? – 2012-03-28 01:25:50