Table of Contents

Method Facet

Namespace
MongoDB.Driver
Assembly
MongoDB.Driver.dll

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

Creates a $facet stage.

public static PipelineStageDefinition<TInput, TOutput> Facet<TInput, TOutput>(IEnumerable<AggregateFacet<TInput>> facets, AggregateFacetOptions<TOutput> options = null)

Parameters

facets IEnumerable<AggregateFacet<TInput>>

The facets.

options AggregateFacetOptions<TOutput>

The options.

Returns

PipelineStageDefinition<TInput, TOutput>

The stage.

Type Parameters

TInput

The type of the input documents.

TOutput

The type of the output documents.

Facet<TInput>(IEnumerable<AggregateFacet<TInput>>)

Creates a $facet stage.

public static PipelineStageDefinition<TInput, AggregateFacetResults> Facet<TInput>(IEnumerable<AggregateFacet<TInput>> facets)

Parameters

facets IEnumerable<AggregateFacet<TInput>>

The facets.

Returns

PipelineStageDefinition<TInput, AggregateFacetResults>

The stage.

Type Parameters

TInput

The type of the input documents.

Facet<TInput>(params AggregateFacet<TInput>[])

Creates a $facet stage.

public static PipelineStageDefinition<TInput, AggregateFacetResults> Facet<TInput>(params AggregateFacet<TInput>[] facets)

Parameters

facets AggregateFacet<TInput>[]

The facets.

Returns

PipelineStageDefinition<TInput, AggregateFacetResults>

The stage.

Type Parameters

TInput

The type of the input documents.

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

Creates a $facet stage.

public static PipelineStageDefinition<TInput, TOutput> Facet<TInput, TOutput>(params AggregateFacet<TInput>[] facets)

Parameters

facets AggregateFacet<TInput>[]

The facets.

Returns

PipelineStageDefinition<TInput, TOutput>

The stage.

Type Parameters

TInput

The type of the input documents.

TOutput

The type of the output documents.