I found an example of implementing the repository pattern in NHibernate on the web, and one of the methods uses this code to get the first result of a query:
public IEnumerable<T> FindAll(DetachedCriteria criteria, int firstResult, int numberOfResults, params Order[] orders)
{
criteria.SetFirstResult(firstResult).SetMaxResults(numberOfResults);
return FindAll(criteria, orders);
}
But VS intellisense isn't picking up this method from DetachedCriteria. Does anyone know if this is possible with DetachedCriteria? I'm using NHibernate version 1.2.1.