title: ASP.NET MVC 3 , partial views and Count()
body: <p>Here is my code in view </p>
  
  <pre><code>@model QA.posts
  @{var c = Model.Count(o =&gt; o.parent == Model.id);}
  </code></pre>
  
  <p>Why the <code>Count()</code> method is not available in this area ?
  I am using that in regular view(s).</p>
  
  <p><strong>EDIT :</strong> 
  It is my mistake , I have <code>IEnumerable&lt;QA.posts&gt;</code> and want to send each item to <code>partial views</code> in foreach statement. It is normal that partial views just get a single class and <code>count()</code> doesn't work. I am going to find solution to send the count separately to view.</p>