Class SkipTakeClauseBuilder
- Namespace
- JsonApiDotNetCore.Queries.QueryableBuilding
- Assembly
- JsonApiDotNetCore.dll
Transforms PaginationExpression into Skip<TSource>(IQueryable<TSource>, int) and Take<TSource>(IQueryable<TSource>, int) calls.
[PublicAPI]
public class SkipTakeClauseBuilder : QueryClauseBuilder, ISkipTakeClauseBuilder
- Inheritance
-
SkipTakeClauseBuilder
- Implements
- Inherited Members
Remarks
Types that implement this interface are stateless by design. Existing instances are reused recursively (perhaps this one not today, but that may change), so don't store mutable state in private fields when implementing this interface or deriving from the built-in implementations. To pass custom state, use the State property. The only private field allowed is a stack where you push/pop state, so it works recursively.
Methods
ApplySkipTake(PaginationExpression, QueryClauseBuilderContext)
public virtual Expression ApplySkipTake(PaginationExpression expression, QueryClauseBuilderContext context)
Parameters
expression
PaginationExpressioncontext
QueryClauseBuilderContext
Returns
VisitPagination(PaginationExpression, QueryClauseBuilderContext)
public override Expression VisitPagination(PaginationExpression expression, QueryClauseBuilderContext context)
Parameters
expression
PaginationExpressioncontext
QueryClauseBuilderContext