Class IncludeClauseBuilder
- Namespace
- JsonApiDotNetCore.Queries.QueryableBuilding
- Assembly
- JsonApiDotNetCore.dll
Transforms IncludeExpression into Include<TEntity, TProperty>(IQueryable<TEntity>, Expression<Func<TEntity, TProperty>>) calls.
[PublicAPI]
public class IncludeClauseBuilder : QueryClauseBuilder, IIncludeClauseBuilder
- Inheritance
-
IncludeClauseBuilder
- 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
ApplyInclude(IncludeExpression, QueryClauseBuilderContext)
public virtual Expression ApplyInclude(IncludeExpression include, QueryClauseBuilderContext context)
Parameters
include
IncludeExpressioncontext
QueryClauseBuilderContext
Returns
VisitInclude(IncludeExpression, QueryClauseBuilderContext)
public override Expression VisitInclude(IncludeExpression expression, QueryClauseBuilderContext context)
Parameters
expression
IncludeExpressioncontext
QueryClauseBuilderContext