How to join two entity objects together?
<p>I took a look around for an answer to this and what I have found is similar to what I am doing but not getting it quite right. I can join two entities when they are lists but not when they are singular objects. I am not sure if this makes sense</p>

<p>Here I have two entity objects</p>

<pre><code>Location location = VIPEF.Locations
    .Where(w =&gt; w.LocationID == id).FirstOrDefault&lt;Location&gt;();
Contact contact = VIPEF.Contacts
    .Where(w =&gt; w.ContactID == location.ContactID).FirstOrDefault&lt;Contact&gt;();
</code></pre>

<p>But when I go to write a query:</p>

<pre><code>var query = from a in location
            join b in contact on a &lt;-- Thats where I get a problem
</code></pre>

<p>once I go to join the two I can't get the ID from location, and the only option i get is <code>a.equals</code> and not <code>a.LocationID</code> as I think I should be getting.</p>

<p>What am I doing wrong here?</p>