title: Getting Null reference when calling join method using linq
body: <p>i have created a method where i join two sql tabels, with linq. when i debug and step into the method and i call it i can see that it is not null. But for som reason i am getting a nullreference when calling it. <br/>
  Here is the method that i am calling.</p>
  
  <pre><code>public ItemIdentity GetIdentityInfo(int tradeItemId)
      {
          var query = (from item in _db.TradeItems
                       join identity in _db.ItemIdentities on item.itemIdentities equals identity.id
                       where item.id == tradeItemId
                       select identity);
          return query as ItemIdentity;
      }
  </code></pre>
  
  <p>And here is where i am calling it.</p>
  
  <pre><code>var tradeItemUnitDescriptor = GetIdentityInfo(tradeItemId).tradeItemUnitDescriptor;
  </code></pre>
  
  <p>is it not possible to call it like this?</p>