Method Slice
Slice<TDocument>(ProjectionDefinition<TDocument>, FieldDefinition<TDocument>, int)
Combines an existing projection with an array slice projection.
public static ProjectionDefinition<TDocument> Slice<TDocument>(this ProjectionDefinition<TDocument> projection, FieldDefinition<TDocument> field, int limit)
Parameters
projection
ProjectionDefinition<TDocument>The projection.
field
FieldDefinition<TDocument>The field.
limit
intThe limit.
Returns
- ProjectionDefinition<TDocument>
A combined projection.
Type Parameters
TDocument
The type of the document.
Slice<TDocument>(ProjectionDefinition<TDocument>, FieldDefinition<TDocument>, int, int)
Combines an existing projection with an array slice projection.
public static ProjectionDefinition<TDocument> Slice<TDocument>(this ProjectionDefinition<TDocument> projection, FieldDefinition<TDocument> field, int skip, int limit)
Parameters
projection
ProjectionDefinition<TDocument>The projection.
field
FieldDefinition<TDocument>The field.
skip
intThe skip.
limit
intThe limit.
Returns
- ProjectionDefinition<TDocument>
A combined projection.
Type Parameters
TDocument
The type of the document.
Slice<TDocument>(ProjectionDefinition<TDocument>, Expression<Func<TDocument, object>>, int)
Combines an existing projection with an array slice projection.
public static ProjectionDefinition<TDocument> Slice<TDocument>(this ProjectionDefinition<TDocument> projection, Expression<Func<TDocument, object>> field, int limit)
Parameters
projection
ProjectionDefinition<TDocument>The projection.
field
Expression<Func<TDocument, object>>The field.
limit
intThe limit.
Returns
- ProjectionDefinition<TDocument>
A combined projection.
Type Parameters
TDocument
The type of the document.
Slice<TDocument>(ProjectionDefinition<TDocument>, Expression<Func<TDocument, object>>, int, int)
Combines an existing projection with an array slice projection.
public static ProjectionDefinition<TDocument> Slice<TDocument>(this ProjectionDefinition<TDocument> projection, Expression<Func<TDocument, object>> field, int skip, int limit)
Parameters
projection
ProjectionDefinition<TDocument>The projection.
field
Expression<Func<TDocument, object>>The field.
skip
intThe skip.
limit
intThe limit.
Returns
- ProjectionDefinition<TDocument>
A combined projection.
Type Parameters
TDocument
The type of the document.