title: Asp.net Mvc 2: Repository, Paging, and Filtering how to?
body: <p>It makes sense to pass a filter object to the repository so it can limit what records return:</p>
  
  <pre><code>var myFilterObject = myFilterFactory.GetBlank();
  myFilterObject.AddFilter( new Filter { "transmission", "eq", "Automatic"} );
  var myCars = myRepository.GetCars(myfilterObject);
  </code></pre>
  
  <p><strong>Key question: how would you implement paging and where?</strong>  Any links on how to return a LazyList from a Repository as it would apply here?  Would this be part of the filter object?  Something like:</p>
  
  <pre><code>myFilterObject.AddFilter( new Filter { "StartAtRecord", "eq", "45"} );
  myFilterObject.AddFilter( new Filter { "GetQuantity", "eq", "15"} );
  var myCars = myRepository.GetCars(myfilterObject);
  </code></pre>
  
  <p>I assume the repository must implement filtering, otherwise you would get all records.</p>