title: Linq - How to select items from a list that contains only items of another list?
body: <p>I have this two classes:</p>
  
  <pre><code>public class Item
  {
     public int Id{get;set;}
     public List&lt;Test&gt; TestList{get;set;} 
  }
  public class Test
  { 
     public int Id{get;set;}
     public Item Item{get;set;}
     public byte State{get;set;}
  }
  </code></pre>
  
  <p>Item Class Data:</p>
  
  <pre><code>Id
   1
   2
   3
  </code></pre>
  
  <p>And Test Class Data:</p>
  
  <pre><code>Item   State
    1      1
    1      2
    1      3
    2      1
    2      4
    3      2
  </code></pre>
  
  <p>Now i need to write a query that select the Items from my class that just have state of 1 and 2.For example for the sample above it should returns row with Item=3.
  i wrote this query:</p>
  
  <pre><code>var stateList=new List&lt;byte&gt;(){1,2};
  Items.Where(x =&gt; x.TestList.Select(c =&gt; c.State).Any(s =&gt; stateList.Contains(s)));
  </code></pre>
  
  <p>but it returns Item=1 either.Any Idea?</p>