Table of Contents

Interface IDataContext

Namespace
NextORM.Core
Assembly
nextorm.core.dll

Composite facade over the individual context roles, kept as the convenient entry point for consumers. The roles are separate interfaces so that providers and collaborators can depend on the smallest surface they actually need:

Connection management is deliberately not part of this composite (see IConnectionManager): the in-memory provider must not be forced to implement a no-op connection lifecycle.

public interface IDataContext : IQueryExecutor, IQueryMaterializer, IQueryPlanner, IRowReaderFactory, IQueryCache, IContextEnvironment, IRawCommandExecutor, IAsyncDisposable, IDisposable
Inherited Members
Extension Methods

Methods

GetPreparedQueryCommand<TResult>(QueryCommand<TResult>, bool, bool, PreparedCommandCache, CancellationToken)

Prepares queryCommand with an explicit command-reuse policy, optionally creating the row enumerator and storing the plan in the cache.

IPreparedQueryCommand<TResult> GetPreparedQueryCommand<TResult>(QueryCommand<TResult> queryCommand, bool createEnumerator, bool storeInCache, PreparedCommandCache cache, CancellationToken cancellationToken)

Parameters

queryCommand QueryCommand<TResult>

The command to prepare.

createEnumerator bool

When true, creates the row enumerator as part of preparation.

storeInCache bool

When true, the resulting plan may be stored in the plan cache.

cache PreparedCommandCache

The policy that selects connection-scoped command reuse or a command per execution.

cancellationToken CancellationToken

Token used to cancel preparation.

Returns

IPreparedQueryCommand<TResult>

The prepared command, ready to execute.

Type Parameters

TResult

The projected result type.

Remarks

The default implementation supports only Connection and forwards to the policy-less overload. A context that does not implement the policy fails closed for any other value instead of silently substituting the connection policy.

Exceptions

NotSupportedException

The context implementation does not implement the requested cache policy.