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