Table of Contents

Method Facet

Namespace
MongoDB.Driver
Assembly
MongoDB.Driver.dll

Facet<TInput, TIntermediate, TOutput>(PipelineDefinition<TInput, TIntermediate>, IEnumerable<AggregateFacet<TIntermediate>>, AggregateFacetOptions<TOutput>)

Appends a $facet stage to the pipeline.

public static PipelineDefinition<TInput, TOutput> Facet<TInput, TIntermediate, TOutput>(this PipelineDefinition<TInput, TIntermediate> pipeline, IEnumerable<AggregateFacet<TIntermediate>> facets, AggregateFacetOptions<TOutput> options = null)

Parameters

pipeline PipelineDefinition<TInput, TIntermediate>

The pipeline.

facets IEnumerable<AggregateFacet<TIntermediate>>

The facets.

options AggregateFacetOptions<TOutput>

The options.

Returns

PipelineDefinition<TInput, TOutput>

A new pipeline with an additional stage.

Type Parameters

TInput

The type of the input documents.

TIntermediate

The type of the intermediate documents.

TOutput

The type of the output documents.

Facet<TInput, TIntermediate>(PipelineDefinition<TInput, TIntermediate>, IEnumerable<AggregateFacet<TIntermediate>>)

Appends a $facet stage to the pipeline.

public static PipelineDefinition<TInput, AggregateFacetResults> Facet<TInput, TIntermediate>(this PipelineDefinition<TInput, TIntermediate> pipeline, IEnumerable<AggregateFacet<TIntermediate>> facets)

Parameters

pipeline PipelineDefinition<TInput, TIntermediate>

The pipeline.

facets IEnumerable<AggregateFacet<TIntermediate>>

The facets.

Returns

PipelineDefinition<TInput, AggregateFacetResults>

A new pipeline with an additional stage.

Type Parameters

TInput

The type of the input documents.

TIntermediate

The type of the intermediate documents.

Facet<TInput, TIntermediate>(PipelineDefinition<TInput, TIntermediate>, params AggregateFacet<TIntermediate>[])

Appends a $facet stage to the pipeline.

public static PipelineDefinition<TInput, AggregateFacetResults> Facet<TInput, TIntermediate>(this PipelineDefinition<TInput, TIntermediate> pipeline, params AggregateFacet<TIntermediate>[] facets)

Parameters

pipeline PipelineDefinition<TInput, TIntermediate>

The pipeline.

facets AggregateFacet<TIntermediate>[]

The facets.

Returns

PipelineDefinition<TInput, AggregateFacetResults>

A new pipeline with an additional stage.

Type Parameters

TInput

The type of the input documents.

TIntermediate

The type of the intermediate documents.

Facet<TInput, TIntermediate, TOutput>(PipelineDefinition<TInput, TIntermediate>, params AggregateFacet<TIntermediate>[])

Appends a $facet stage to the pipeline.

public static PipelineDefinition<TInput, TOutput> Facet<TInput, TIntermediate, TOutput>(this PipelineDefinition<TInput, TIntermediate> pipeline, params AggregateFacet<TIntermediate>[] facets)

Parameters

pipeline PipelineDefinition<TInput, TIntermediate>

The pipeline.

facets AggregateFacet<TIntermediate>[]

The facets.

Returns

PipelineDefinition<TInput, TOutput>

A new pipeline with an additional stage.

Type Parameters

TInput

The type of the input documents.

TIntermediate

The type of the intermediate documents.

TOutput

The type of the output documents.