Table of Contents

Class MongoQueryableExtensions

Namespace
eQuantic.Core.Data.MongoDb
Assembly
eQuantic.Core.Data.MongoDb.dll

Applies a QueryOptions<TEntity> to a MongoDB IQueryable<T> (obtained from IMongoCollection<TEntity>.AsQueryable(), which is an IMongoQueryable and thus a real IQueryable<T> that the driver translates to an aggregation pipeline).

public static class MongoQueryableExtensions
Inheritance
MongoQueryableExtensions
Inherited Members

Remarks

The store-agnostic shaping — before/after customization, specification + predicate filter and sortings — is applied here. Include is applied separately by the repository as a server-side $lookup (see eQuantic.Core.Data.MongoDb.MongoInclude). 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 collection).

options QueryOptions<TEntity>

The query options, or null for no shaping.

Returns

IQueryable<TEntity>

The shaped query.

Type Parameters

TEntity

The entity type.