title: EntityReference can have no more than one related object - many to many with LINQ
body: <p>I have two lists. They are both populated through database:</p>
  
  <ul>
  <li>ListA: ID, PayID, PayDesc, ListB</li>
  <li>ListB: ID, PayID, MoneyDesc</li>
  </ul>
  
  <p>where ListB looks like:</p>
  
  <pre class="lang-none prettyprint-override"><code>ID      PayID    MoneyDesc
  1       2        a
  1       3        b
  1       4        c
  </code></pre>
  
  <p>The code snippet where I get an error goes something like this:</p>
  
  <pre class="lang-cs prettyprint-override"><code>ListA.FirstOrDefault().ListB = 
      (from b in ListB where (ListA.Any(x =&gt; x.PayID == b.PayID) select b))
      .ToList().FirstOrDefault();
  </code></pre>
  
  <p>What I want to happen is something like:</p>
  
  <pre class="lang-sql prettyprint-override"><code>select moneydesc 
  from listb b 
  inner join lista a on b.payid = a.payid
  </code></pre>
  
  <p>But I get "EntityReference can have no more than one related object" error.
  However, if <code>ListB</code>'s <code>ID</code>'s are different per row, say 7, 8 and 9, respectively, the error does not occur.</p>
  
  <p>How can I achieve what I had in mind? Also, shouldn't <code>FirstOrDefault()</code> be able to handle this, since it gets the first element in a sequence?</p>