Product
+------------+-------------+------------+
| PID | Name | Model |
+------------+-------------+------------+
| 1 | Mercedes | xyz |
| 2 | Audi | yxz |
| 3 | BMW | zyx |
+------------+-------------+------------+
ProductColor
+------------+-------------+------------+
| ID | ProductID | Color |
+------------+-------------+------------+
| 1 | 1 | Red |
| 2 | 1 | Blue |
| 3 | 3 | Blue |
+------------+-------------+------------+
我需要從ProductColor中選擇產品ID,其中藍色和紅色?如何編寫正確的Linq查詢?Linq加入一對多AND標準
你到目前爲止嘗試過什麼?你能提供你的課程的例子嗎? – Richard
[我如何檢索用linq中所有提供的標籤標記的項目?](http://stackoverflow.com/questions/3478874/how-do-i-retrieve-items-that-are-tagged (x => x.ProductColors.Where(y => y.Color ==「blue」)。選擇(所有提供的標籤在LINQ) –