title: ASP.Net MVC Razor Sum and Count functions
body: <p>Is it possible to use "Sum" within Razor, so you can sum up what has been interated through on the view.  ie. my view is like this:</p>
  
  <pre><code>@model IEnumerable&lt;cb2.ViewModels.ResultsVM&gt;
  ...
  @foreach (var item in Model) {
  &lt;tr&gt;
      &lt;td&gt;
          @Html.DisplayFor(modelItem =&gt; item.Qualified)
      &lt;/td&gt;
    ...
   }
  </code></pre>
  
  <p>I then want to sum up all of the Qualified in at the bottom of the screen similar to this:</p>
  
  <pre><code>@Model.Qualified.Sum()
  </code></pre>
  
  <p>But I get the error:</p>
  
  <p><code>'System.Collections.Generic.IEnumerable&lt;cb2.ViewModels.ResultsVM&gt;' does not contain a definition for 'Qualified'</code></p>
  
  <p>I thought it would have been easy in Qazor to simply use Sum or Count on a model?</p>
  
  <p>thanks, Mark</p>