Table of Contents

Method Facet

Namespace
MongoDB.Driver
Assembly
MongoDB.Driver.dll

Facet<TResult>(IAggregateFluent<TResult>, IEnumerable<AggregateFacet<TResult>>)

Appends a $facet stage to the pipeline.

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

Parameters

aggregate IAggregateFluent<TResult>

The aggregate.

facets IEnumerable<AggregateFacet<TResult>>

The facets.

Returns

IAggregateFluent<AggregateFacetResults>

The fluent aggregate interface.

Type Parameters

TResult

The type of the result.

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

Appends a $facet stage to the pipeline.

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

Parameters

aggregate IAggregateFluent<TResult>

The aggregate.

facets AggregateFacet<TResult>[]

The facets.

Returns

IAggregateFluent<AggregateFacetResults>

The fluent aggregate interface.

Type Parameters

TResult

The type of the result.

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

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<TResult>

The aggregate.

facets AggregateFacet<TResult>[]

The facets.

Returns

IAggregateFluent<TNewResult>

The fluent aggregate interface.

Type Parameters

TResult

The type of the result.

TNewResult

The type of the new result.