title: Invalid anonymous type member declarator in LINQ
body: <p>I have two entities. One is "Students" while another is "Subjects". </p>
  
  <p>The details of the two entities is something like:</p>
  
  <pre><code>students { id, name}
  
  subjects { studentID, subjectName, passed}
  </code></pre>
  
  <p>where "passed" is of boolean type.</p>
  
  <p>Now I want to query the student name and count of subject that he can pass with follows:</p>
  
  <pre><code>var result = from s in db.students 
  select new {s.name, s.subjects.Count(i =&gt; i.passed.Equals(true)};
  </code></pre>
  
  <p>But i get error msg:Invalid anonymous type member declarator. Anonymous type members must be declared with a member assignment, simple name or member access.</p>
  
  <p>I dun know how to solve it. Would anyone help me please?
  thanks </p>