Method Facet

| MongoDB CSharp Driver API Reference (original) (raw)

Namespace

MongoDB.Driver

Assembly

MongoDB.Driver.dll

Facet(IAggregateFluent, IEnumerable<AggregateFacet>)

Appends a $facet stage to the pipeline.

public static IAggregateFluent<AggregateFacetResults> Facet<TResult>(this IAggregateFluent<TResult> aggregate, IEnumerable<AggregateFacet<TResult>> facets)

Parameters

aggregate IAggregateFluent

The aggregate.

facets IEnumerable<AggregateFacet>

The facets.

Returns

IAggregateFluent<AggregateFacetResults>

The fluent aggregate interface.

Type Parameters

TResult

The type of the result.

Facet(IAggregateFluent, params AggregateFacet[])

Appends a $facet stage to the pipeline.

public static IAggregateFluent<AggregateFacetResults> Facet<TResult>(this IAggregateFluent<TResult> aggregate, params AggregateFacet<TResult>[] facets)

Parameters

aggregate IAggregateFluent

The aggregate.

facets AggregateFacet[]

The facets.

Returns

IAggregateFluent<AggregateFacetResults>

The fluent aggregate interface.

Type Parameters

TResult

The type of the result.

Facet<TResult, TNewResult>(IAggregateFluent, params AggregateFacet[])

Appends a $facet stage to the pipeline.

public static IAggregateFluent<TNewResult> Facet<TResult, TNewResult>(this IAggregateFluent<TResult> aggregate, params AggregateFacet<TResult>[] facets)

Parameters

aggregate IAggregateFluent

The aggregate.

facets AggregateFacet[]

The facets.

Returns

IAggregateFluent

The fluent aggregate interface.

Type Parameters

TResult

The type of the result.

TNewResult

The type of the new result.