예제 #1
0
 private static void SetPagination(IDetachedQuery query, int pageSize, int pageNumber)
 {
     if (query == null)
     {
         throw new ArgumentNullException("query");
     }
     query.SetFirstResult(pageSize * (pageNumber < 1 ? 0 : pageNumber - 1)).SetMaxResults(pageSize);
 }
예제 #2
0
        private static void ResetPagination(IDetachedQuery query)
        {
            if (query == null)
            {
                throw new ArgumentNullException("query");
            }

            query.SetFirstResult(default(int)).SetMaxResults(RowSelection.NoValue);
        }