Table of Contents

Class InMemoryCompiledQuery<TResult, TEntity>

Namespace
NextORM.Core
Assembly
nextorm.core.dll

Compiled query over an in-memory entity set.

public sealed class InMemoryCompiledQuery<TResult, TEntity> : PreparedQueryCommand<TResult, TEntity>, IPreparedQueryCommand<TResult>

Type Parameters

TResult
TEntity
Inheritance
PreparedQueryCommand<TResult, TEntity>
InMemoryCompiledQuery<TResult, TEntity>
Implements
Inherited Members
Extension Methods

Constructors

InMemoryCompiledQuery(Func<Func<TEntity, TResult>>, Func<TEntity, object[]?, bool>?, Func<object[]?, Func<TEntity, bool>>?, Func<TEntity, bool>?)

Creates a compiled in-memory query from lazily resolved projection and predicate factories.

public InMemoryCompiledQuery(Func<Func<TEntity, TResult>> func, Func<TEntity, object[]?, bool>? condition, Func<object[]?, Func<TEntity, bool>>? conditionFactory = null, Func<TEntity, bool>? conditionDirect = null)

Parameters

func Func<Func<TEntity, TResult>>

Resolves the projection applied to each matching entity.

condition Func<TEntity, object[], bool>

Predicate evaluated per entity with the current parameters, or null for an unconditional query.

conditionFactory Func<object[], Func<TEntity, bool>>

Builds a strongly typed predicate from the current parameters, taking precedence over condition when supplied.

conditionDirect Func<TEntity, bool>

Strongly typed predicate for parameterless conditions, used when no factory output is available.

Fields

Condition

Predicate evaluated per entity, receiving the current parameter values; null when the query is unconditional.

public readonly Func<TEntity, object[]?, bool>? Condition

Field Value

Func<TEntity, object[], bool>

ConditionDirect

Strongly typed predicate for parameterless conditions.

public readonly Func<TEntity, bool>? ConditionDirect

Field Value

Func<TEntity, bool>

ConditionFactory

Builds a strongly typed predicate from the current parameter values (resolved once per query). Avoids indexing/boxing object[] on every enumerated row.

public readonly Func<object[]?, Func<TEntity, bool>>? ConditionFactory

Field Value

Func<object[], Func<TEntity, bool>>