Table of Contents

Method Slice

Namespace
MongoDB.Driver
Assembly
MongoDB.Driver.dll

Slice(FieldDefinition<TSource>, int)

Creates an array slice projection.

public ProjectionDefinition<TSource> Slice(FieldDefinition<TSource> field, int limit)

Parameters

field FieldDefinition<TSource>

The field.

limit int

The limit.

Returns

ProjectionDefinition<TSource>

An array slice projection.

Slice(FieldDefinition<TSource>, int, int)

Creates an array slice projection.

public ProjectionDefinition<TSource> Slice(FieldDefinition<TSource> field, int skip, int limit)

Parameters

field FieldDefinition<TSource>

The field.

skip int

The skip.

limit int

The limit.

Returns

ProjectionDefinition<TSource>

An array slice projection.

Slice(Expression<Func<TSource, object>>, int)

Creates an array slice projection.

public ProjectionDefinition<TSource> Slice(Expression<Func<TSource, object>> field, int limit)

Parameters

field Expression<Func<TSource, object>>

The field.

limit int

The limit.

Returns

ProjectionDefinition<TSource>

An array slice projection.

Slice(Expression<Func<TSource, object>>, int, int)

Creates an array slice projection.

public ProjectionDefinition<TSource> Slice(Expression<Func<TSource, object>> field, int skip, int limit)

Parameters

field Expression<Func<TSource, object>>

The field.

skip int

The skip.

limit int

The limit.

Returns

ProjectionDefinition<TSource>

An array slice projection.