Table of Contents

Class CosmosQueryableExtensions

Namespace
eQuantic.Core.Data.CosmosDb
Assembly
eQuantic.Core.Data.CosmosDb.dll

Applies a QueryOptions<TEntity> to a Cosmos IQueryable<T> obtained from Container.GetItemLinqQueryable<TEntity>(), which the SDK translates to a SQL query.

public static class CosmosQueryableExtensions
Inheritance
CosmosQueryableExtensions
Inherited Members

Remarks

The store-agnostic shaping — before/after customization, specification + predicate filter and sortings — is applied here. Include is rejected by the repository (Cosmos has no cross-document navigations); the remaining EF-only knobs (change tracking, global query filters, query tags) have no meaning for a document store and are intentionally ignored.

Methods

ApplyQueryOptions<TEntity>(IQueryable<TEntity>, QueryOptions<TEntity>?)

Shapes the query with the supplied options.

public static IQueryable<TEntity> ApplyQueryOptions<TEntity>(this IQueryable<TEntity> source, QueryOptions<TEntity>? options) where TEntity : class

Parameters

source IQueryable<TEntity>

The source query (typically the container).

options QueryOptions<TEntity>

The query options, or null for no shaping.

Returns

IQueryable<TEntity>

The shaped query.

Type Parameters

TEntity

The entity type.