title: LINQ lambda with where clause
body: <p>I'm trying to convert this LINQ statement into a <code>Lambda</code> expression.  </p>
  
  <pre><code>totalTickets = (from parent in context.EventParentSponsors
      join sponsor in context.EventSponsors
      on parent.EventSponsorId equals sponsor.EventSponsorId
      where parent.ParentSponsorID == parentId
      select sponsor.InvitationCount).FirstOrDefault();
  </code></pre>
  
  <p>This is what I have so far:</p>
  
  <pre><code>totalTickets = context.EventParentSponsors
      .Join(context.EventSponsors, 
          parent =&gt; parent.EventSponsorId,
          sponsor =&gt; sponsor.EventSponsorId, 
          (parent, sponsor) =&gt; new { sponsor.InvitationCount })
      .Where(o =&gt; o.EventParentSponsors.ParentSponsorId).FirstOrDefault();
  </code></pre>
  
  <p>but I get this error</p>
  
  <pre><code>AnonymousType#1' does not contain a definition for 'EventParentSponsors'
  and no extension method 'EventParentSponsors' accepting a first argument of type     'AnonymousType#1' could be found
  </code></pre>
  
  <p>What I am missing?</p>