Table of Contents

Class QueryClauseBuilderContext

Namespace
JsonApiDotNetCore.Queries.QueryableBuilding
Assembly
JsonApiDotNetCore.dll

Immutable contextual state for *ClauseBuilder types.

[PublicAPI]
public sealed class QueryClauseBuilderContext
Inheritance
QueryClauseBuilderContext
Inherited Members

Constructors

QueryClauseBuilderContext(Expression, ResourceType, Type, IReadOnlyModel, LambdaScopeFactory, LambdaScope, IQueryableBuilder, object?)

public QueryClauseBuilderContext(Expression source, ResourceType resourceType, Type extensionType, IReadOnlyModel entityModel, LambdaScopeFactory lambdaScopeFactory, LambdaScope lambdaScope, IQueryableBuilder queryableBuilder, object? state)

Parameters

source Expression
resourceType ResourceType
extensionType Type
entityModel IReadOnlyModel
lambdaScopeFactory LambdaScopeFactory
lambdaScope LambdaScope
queryableBuilder IQueryableBuilder
state object

Properties

EntityModel

The Entity Framework Core entity model.

public IReadOnlyModel EntityModel { get; }

Property Value

IReadOnlyModel

ExtensionType

The extension type to generate calls on, typically Queryable or Enumerable.

public Type ExtensionType { get; }

Property Value

Type

LambdaScope

The lambda expression currently in scope.

public LambdaScope LambdaScope { get; }

Property Value

LambdaScope

LambdaScopeFactory

Used to produce unique names for lambda parameters.

public LambdaScopeFactory LambdaScopeFactory { get; }

Property Value

LambdaScopeFactory

QueryableBuilder

The outer driver for building query clauses.

public IQueryableBuilder QueryableBuilder { get; }

Property Value

IQueryableBuilder

ResourceType

The resource type for Source.

public ResourceType ResourceType { get; }

Property Value

ResourceType

Source

The source expression to append to.

public Expression Source { get; }

Property Value

Expression

State

Enables to pass custom state that you'd like to transfer between calls.

public object? State { get; }

Property Value

object

Methods

WithLambdaScope(LambdaScope)

public QueryClauseBuilderContext WithLambdaScope(LambdaScope lambdaScope)

Parameters

lambdaScope LambdaScope

Returns

QueryClauseBuilderContext

WithSource(Expression)

public QueryClauseBuilderContext WithSource(Expression source)

Parameters

source Expression

Returns

QueryClauseBuilderContext