Table of Contents

Class QueryableBuilderContext

Namespace
JsonApiDotNetCore.Queries.QueryableBuilding
Assembly
JsonApiDotNetCore.dll

Immutable contextual state for IQueryableBuilder.

[PublicAPI]
public sealed class QueryableBuilderContext
Inheritance
QueryableBuilderContext
Inherited Members

Constructors

QueryableBuilderContext(Expression, Type, Type, IReadOnlyModel, LambdaScopeFactory, object?)

public QueryableBuilderContext(Expression source, Type elementType, Type extensionType, IReadOnlyModel entityModel, LambdaScopeFactory lambdaScopeFactory, object? state)

Parameters

source Expression
elementType Type
extensionType Type
entityModel IReadOnlyModel
lambdaScopeFactory LambdaScopeFactory
state object

Properties

ElementType

The element type for Source.

public Type ElementType { get; }

Property Value

Type

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

LambdaScopeFactory

Used to produce unique names for lambda parameters.

public LambdaScopeFactory LambdaScopeFactory { get; }

Property Value

LambdaScopeFactory

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

CreateClauseContext(IQueryableBuilder, Expression, ResourceType, LambdaScope)

public QueryClauseBuilderContext CreateClauseContext(IQueryableBuilder queryableBuilder, Expression source, ResourceType resourceType, LambdaScope lambdaScope)

Parameters

queryableBuilder IQueryableBuilder
source Expression
resourceType ResourceType
lambdaScope LambdaScope

Returns

QueryClauseBuilderContext

CreateRoot(IQueryable, Type, IReadOnlyModel, object?)

public static QueryableBuilderContext CreateRoot(IQueryable source, Type extensionType, IReadOnlyModel entityModel, object? state)

Parameters

source IQueryable
extensionType Type
entityModel IReadOnlyModel
state object

Returns

QueryableBuilderContext