linqの子コレクションに対してIN句クエリを実行する方法を探しています。
次のような例があります。
Entity: Product.CategoryAssignments - this is an IList<Category> that the product is assigned to. Product can be assigned to multiple categories.
カテゴリのリストに一致するすべての製品を取得したい、つまり
IList<Category> selectedCategories = GetUsersSelectedCategories();
//次のようなことを行う方法
IList<Products> products = from p in repository where p.CategoryAssignments.Contains(?) select p;
何かアドバイスはありますか?