Table of Contents

Method Exclude

Namespace
MongoDB.Driver
Assembly
MongoDB.Driver.dll

Exclude(FieldDefinition<TSource>)

Creates a projection that excludes a field.

public ProjectionDefinition<TSource> Exclude(FieldDefinition<TSource> field)

Parameters

field FieldDefinition<TSource>

The field.

Returns

ProjectionDefinition<TSource>

An exclusion projection.

Exclude(Expression<Func<TSource, object>>)

Creates a projection that excludes a field.

public ProjectionDefinition<TSource> Exclude(Expression<Func<TSource, object>> field)

Parameters

field Expression<Func<TSource, object>>

The field.

Returns

ProjectionDefinition<TSource>

An exclusion projection.