title: How do I add an order by to server side code in my mvc View
body: <p>How can I append to the first line <code>.OrderBy</code> and specify a property <code>OrderById</code>. I'm finding it confusing, i.e. Func &amp; KeySelector etc.</p>
  
  <pre><code>&lt;% foreach (var item in Model.PaymentItemTotals)
  { %&gt;
      &lt;tr&gt;
          &lt;td&gt;&lt;%= Html.Encode(item.Line)%&gt;&lt;/td&gt;
          &lt;td&gt;&lt;strong&gt;&lt;%= String.Format("{0:C}", item.AmountTotal)%&gt;&lt;/strong&gt;&lt;/td&gt;
          &lt;td&gt;&lt;%= String.Format("{0:C}", item.Amount)%&gt;&lt;/td&gt;
          &lt;td&gt;&lt;%= String.Format("{0:C}", item.AmountIndex)%&gt;&lt;/td&gt;
      &lt;/tr&gt;                    
   &lt;% } %&gt;
  </code></pre>