LINQ Nested Where

Posted by griegs on Stack Overflow See other posts from Stack Overflow or by griegs
Published on 2010-04-21T03:19:16Z Indexed on 2010/04/21 3:23 UTC
Read the original article Hit count: 449

Filed under:

If I have the following model;

  public List<RecommendedProduct> recommendations

Then

public class RecommendedProduct
  public List<Product> Products

Then the Product;

public class Product
  public string Code

The recommendations list has, as an example, 10 items in it.

Each recommendations item has two Products in it.

How, with LINQ, can I find the recommendations object that has products with both "A" and "B" product codes?

© Stack Overflow or respective owner

Related posts about LINQ