title: Count by ID in Lambda Expression
body: <p>I have Meetings and Cities tables and joined both of them with lambda expression. On the other hand I set a property "Expired" according to the meeting date as below. Instead of the Expired property below, I want to use Total property so that checking the total count of each applicant for a meeting <strong>with the same MeetingID</strong>. Wşth the help of this, I can  determine if there are 50 person for the same meeting (by the same meeting ID) in Meetings table and prevent users to apply more than 50 person. </p>
  
  <p>In my code below I use Expired parameter that is set according to the MeetingDate property. I need to assign such a kind of property like "Full" in order to get a total applicant for each meeting by id. How can I do this in Lambda expression below? </p>
  
  <p><br/>
  <strong>City Model:</strong></p>
  
  <pre><code>public class City
  {
      public int CityID { get; set; }
      public string CityName { get; set; }
  }    
  </code></pre>
  
  <p><br/>
  <strong>Meeting Model:</strong></p>
  
  <pre><code>public class Meeting
  {
      public int MeetingID { get; set; }
      public string MeetingName { get; set; }
      public DateTime MeetingStartDate { get; set; }       
      public DateTime? MeetingEndDate { get; set; }
      public int? TotalParticipant { get; set; }
      public int? MeetingCityId { get; set; }
  }
  </code></pre>
  
  <p><br/></p>
  
  <p><strong>Applicant Model:</strong></p>
  
  <pre><code>public class Applicant
  {
      [Key]
      public int ApplicantID { get; set; }
      public DateTime? SubmitDate { get; set; }
      public string Name { get; set; }
      public string Surname { get; set; }   
      public int MeetingId { get; set; } 
  }
  </code></pre>
  
  <p><br/>
  <strong>Controller:</strong></p>
  
  <pre><code>var meetingsQuery = repository.Meetings
              .Join(repository.Cities, m =&gt; m.MeetingCityId, c =&gt; c.CityID,
                  (m, c) =&gt; new
                  {
                      CityID = c.CityID,
                      CityName = c.CityName,
                      MeetingDate = m.MeetingStartDate
                  }
              )
              .OrderBy(x =&gt; x.CityID)
              .AsEnumerable()
              .Select(
                  i =&gt; new
                  {
                      Value = i.CityID.ToString(),
                      DisplayValue = string.Format(
                          "{0} ({1:dd MMMM yyyy})",
                          i.CityName, i.MeetingDate),
                      Expired = i.MeetingDate &lt; DateTime.UtcNow,
                      Full = ... ???
                  }
              ).ToList();
  </code></pre>