Hi
I am looking for a way to do a IN clause query on child collections in linq.
I have a an example as follows:
Entity: Product.CategoryAssignments - this is an IList<Category> that the product is assigned to. Product can be assigned to multiple categories.
I want to retrieve all products matching in a list of categories i.e.
IList<Category> selectedCategories = GetUsersSelectedCategories();
// how to do something like
IList<Products> products = from p in repository where p.CategoryAssignments.Contains(?) select p;
Any tips appreciated?