Class CosmosQueryableExtensions
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
sourceIQueryable<TEntity>The source query (typically the container).
optionsQueryOptions<TEntity>The query options, or
nullfor no shaping.
Returns
- IQueryable<TEntity>
The shaped query.
Type Parameters
TEntityThe entity type.