title: Linq SelectMany query not working
body: <p>I have the following database tables where the relationship between Topic and Comment is 1:N</p>
  
  <pre><code>Category
  id
  name
  
  Topic
  id
  title
  category_id
  
  Comment
  id
  details
  topic_id
  deleted (boolean)  
  </code></pre>
  
  <p>I want a query to count total comments in each category. I have the following LINQ query but it doesn't work:</p>
  
  <pre><code>@foreach (var cat in Model.AllPermissionSets.Keys)
  
  {
     var commentCount = cat.Topics.Where(c =&gt; c.Comments.deleted != 0).SelectMany(x =&gt; x.Comments).Count();
  
     @* some other stuff *@
  }
  </code></pre>
  
  <p>In Visual studio I get error <code>IList&lt;Comment&gt; doesn not contain a definition for deleted...</code></p>
  
  <p>What's the correct syntax to do the above?</p>