Method Facet

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

Namespace

MongoDB.Driver

Assembly

MongoDB.Driver.dll

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

Creates a $facet stage.

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

Parameters

facets IEnumerable<AggregateFacet>

The facets.

options AggregateFacetOptions

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(IEnumerable<AggregateFacet>)

Creates a $facet stage.

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

Parameters

facets IEnumerable<AggregateFacet>

The facets.

Returns

PipelineStageDefinition<TInput, AggregateFacetResults>

The stage.

Type Parameters

TInput

The type of the input documents.

Facet(params AggregateFacet[])

Creates a $facet stage.

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

Parameters

facets AggregateFacet[]

The facets.

Returns

PipelineStageDefinition<TInput, AggregateFacetResults>

The stage.

Type Parameters

TInput

The type of the input documents.

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

Creates a $facet stage.

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

Parameters

facets AggregateFacet[]

The facets.

Returns

PipelineStageDefinition<TInput, TOutput>

The stage.

Type Parameters

TInput

The type of the input documents.

TOutput

The type of the output documents.