title: LINQ Where clause with Contains where the list has complex object
body: <p>I've seen plenty of examples of LINQ with a contains on a simple list of objects:</p>
  
  <pre><code>var intList= new List&lt;int&gt;() { 1, 2, 3 };
  var result = db.TableRecords.Where(c =&gt; intList.Contains(c.RecordId)).ToList();
  </code></pre>
  
  <p>What I'm trying to do seems slightly more complicated (I think). I have a line of code similar to this one gets me the list I need:</p>
  
  <pre><code>var xzList = db.Relations.Where(r =&gt; someOtherList.Contains(r.zId))
                           .Select(r =&gt; new { AId = r.xId, BId = r.zId })
                           .ToList();
  </code></pre>
  
  <p>And now I want to get the result similar to the previous example but the list now has an anonymous type in it with two ints.  So how would I now get <code>result</code> where <code>RecordId</code> in <code>TableRecords</code> equals the <code>AId</code> in the anonymous type for each anonymous type in <code>xzList</code>?</p>