title: Ordering in a MVC and Repository Pattern structure
body: <p>I am developing an application with ASP.NET MVC and repository pattern with a <a href="http://www.asp.net/mvc/tutorials/older-versions/models-%28data%29/validating-with-a-service-layer-cs" rel="nofollow">service layer</a> that exposes some funcionalities in a web service used by another application. Sometimes I get confused about the roles in each layer. One of my doubts is about ordering lists of objects to show on the view. </p>
  
  <p><strong>I should order the lists in the view, controller, service or repository?</strong></p>
  
  <p>As this is a '<em>way of show the items</em>', I guess this is a view responsability, but i use the same list with same ordering in another application through the web service. So, this ordering should be on service layer? Or I should order in repository, by query, to optimize the ordering?</p>