title: join list with linq-to-sql query
body: <p>I have list of MyObject that looks like this:</p>
  
  <pre><code>public class MyObject{
    public int FruitID {get;set;}
    public string FruitName {get;set;}
  }
  
  List&lt;MyObject&gt; TheList = new List&lt;MyObject&gt;();
  </code></pre>
  
  <p>This list is populated with a linq-to-sql query. I'm looking to create a join between this list and a table that contains FruitID as its foreign key.</p>
  
  <p>The table HarvestTimes looks like this:</p>
  
  <pre><code>FruitID   |   HarvestDatetime  |   RipeFactor
     3      |        3/4/2011    |       2
     3      |        4/5/2011    |       4
     3      |        5/5/2011    |       3
     4      |        3/21/2011   |       2
     4      |        4/10/2011   |       2
     4      |        5/10/2011   |       2
  </code></pre>
  
  <p>This is what I have so far:</p>
  
  <pre><code>var TheQuery = (from list in TheList
                  join fruit in MyDC.HarvestTimes on
                  list.FruitID equals fruit.FruitID
                  where ....
                  select new MyObject{... }).ToList();
  </code></pre>
  
  <p>I'm have some trouble with the Where clause. <strong>How do I get only the Fruit where the RipeFactor was always 2.</strong> For instance, Fruit 3 has a RipeFactor of 2 but also has 4 and whereas only Fruit4 has only 2s. I tried with Contains but both fruits come up.</p>
  
  <p>Thanks for your suggestions.</p>