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
sourceExpressionelementTypeTypeextensionTypeTypeentityModelIReadOnlyModellambdaScopeFactoryLambdaScopeFactorystateobject
Properties
ElementType
The element type for Source.
public Type ElementType { get; }
Property Value
EntityModel
The Entity Framework Core entity model.
public IReadOnlyModel EntityModel { get; }
Property Value
ExtensionType
The extension type to generate calls on, typically Queryable or Enumerable.
public Type ExtensionType { get; }
Property Value
LambdaScopeFactory
Used to produce unique names for lambda parameters.
public LambdaScopeFactory LambdaScopeFactory { get; }
Property Value
Source
The source expression to append to.
public Expression Source { get; }
Property Value
State
Enables to pass custom state that you'd like to transfer between calls.
public object? State { get; }
Property Value
Methods
CreateClauseContext(IQueryableBuilder, Expression, ResourceType, LambdaScope)
public QueryClauseBuilderContext CreateClauseContext(IQueryableBuilder queryableBuilder, Expression source, ResourceType resourceType, LambdaScope lambdaScope)
Parameters
queryableBuilderIQueryableBuildersourceExpressionresourceTypeResourceTypelambdaScopeLambdaScope
Returns
CreateRoot(IQueryable, Type, IReadOnlyModel, object?)
public static QueryableBuilderContext CreateRoot(IQueryable source, Type extensionType, IReadOnlyModel entityModel, object? state)
Parameters
sourceIQueryableextensionTypeTypeentityModelIReadOnlyModelstateobject