title: Dynamics 365 OrganizationServiceContext Linq Query with multiple Joins
body: <p>I am running into an issue running most of my queries. I can generate a link query with a join to only one related entity at a time.  But when I run a LINQ query with multiple joins as in the example below, I get the "Sequence contains no elements" error.</p>
  
  <pre><code>var query =
  (
      from permission in context.CreateQuery&lt;ServiceModel.Types.idoe_permission&gt;()
          join contact in context.CreateQuery&lt;ServiceModel.Types.Contact&gt;()
              on permission.idoe_contact_idoe_permission.Id equals contact.Id
          join corporation in context.CreateQuery&lt;ServiceModel.Types.idoe_corporation&gt;()
              on permission.idoe_idoe_corporation_idoe_permission.Id equals corporation.Id
          join role in context.CreateQuery&lt;ServiceModel.Types.idoe_role&gt;()
              on permission.idoe_idoe_role_idoe_permission.Id equals role.Id
      where contact.idoe_ADB2CID == request.UserId
      select new { Corporation = corporation, Role = role }
  ).ToList();
  </code></pre>
  
  <p>I am only able to "join" one entity at a time. Other examples I have seen allow multiple joins, but I have not been able to get this to work.</p>
  
  <p>Any suggestions?</p>