@@ -57,31 +57,29 @@ public OrderByClause<T> ThenByDescending<TValue>(Expression<Func<T, TValue>> ord
5757 public LimitClause < T > Take ( int n )
5858 {
5959 Contract . Requires ( n >= 0 ) ;
60- return new LimitClause < T > ( this , n , null ) ;
60+ return new LimitClause < T > ( this , n ) ;
6161 }
6262
6363 /// <summary>
64- /// Returns a <see cref="LimitClause <T>"/> that skips a specified number of elements in the result set and then returns the remaining elements.
64+ /// Returns a <see cref="OffsetClause <T>"/> that skips a specified number of elements in the result set and then returns the remaining elements.
6565 /// </summary>
6666 /// <param name="n">The number of elements to skip before returning the remaining elements.</param>
67- /// <returns>A new <see cref="LimitClause <T>"/>.</returns>
68- public LimitClause < T > Skip ( int n )
67+ /// <returns>A new <see cref="OffsetClause <T>"/>.</returns>
68+ public OffsetClause < T > Skip ( int n )
6969 {
70- Contract . Requires ( n >= 0 ) ;
71-
7270 //If the LIMIT expression evaluates to a negative value, then there is no upper bound on the number of rows returned
73- return new LimitClause < T > ( this , - 1 , n ) ;
71+ return new LimitClause < T > ( this , - 1 ) . Skip ( n ) ;
7472 }
7573
7674 /// <summary>
77- /// Returns a <see cref="LimitClause <T>"/> that returns the element at a specified index in the result set.
75+ /// Returns a <see cref="OffsetClause <T>"/> that returns the element at a specified index in the result set.
7876 /// </summary>
79- /// <param name="index">Index .</param>
80- /// <returns>A new <see cref="LimitClause <T>"/>.</returns>
81- public LimitClause < T > ElementAt ( int index )
77+ /// <param name="index">The index of the element to retrieve .</param>
78+ /// <returns>A new <see cref="OffsetClause <T>"/>.</returns>
79+ public OffsetClause < T > ElementAt ( int index )
8280 {
8381 Contract . Requires ( index >= 0 ) ;
84- return Skip ( index ) . Take ( 1 ) ;
82+ return this . Take ( 1 ) . Skip ( index ) ;
8583 }
8684
8785 private OrderByClause < T > AddOrderBy < TValue > ( Expression < Func < T , TValue > > orderExpr , bool asc )
0 commit comments