NHibernate Server-Side Pagination with ICriteria SetMaxResults and SetFirstResult
Use ICriteria SetMaxResults and SetFirstResult for database-side pagination in NHibernate, with example SQL and limitations.
ReadMeFeed / Community knowledge
Real questions. Useful conversations. Find the people who know your stack.
Use ICriteria SetMaxResults and SetFirstResult for database-side pagination in NHibernate, with example SQL and limitations.
NHibernate's LINQ provider translates Skip() and Take() into SQL OFFSET/FETCH or LIMIT/OFFSET depending on the configured dialect. A documented behavioral ambiguity arises when these methods are applied without an explicit OrderBy clause, as the database may return rows in an unspecified order, producing inconsistent page results across separate executions.