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
projectionProjectionDefinition<TDocument>The projection.
fieldFieldDefinition<TDocument>The field.
limitintThe limit.
Returns
- ProjectionDefinition<TDocument>
A combined projection.
Type Parameters
TDocumentThe 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
projectionProjectionDefinition<TDocument>The projection.
fieldFieldDefinition<TDocument>The field.
skipintThe skip.
limitintThe limit.
Returns
- ProjectionDefinition<TDocument>
A combined projection.
Type Parameters
TDocumentThe 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
projectionProjectionDefinition<TDocument>The projection.
fieldExpression<Func<TDocument, object>>The field.
limitintThe limit.
Returns
- ProjectionDefinition<TDocument>
A combined projection.
Type Parameters
TDocumentThe 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
projectionProjectionDefinition<TDocument>The projection.
fieldExpression<Func<TDocument, object>>The field.
skipintThe skip.
limitintThe limit.
Returns
- ProjectionDefinition<TDocument>
A combined projection.
Type Parameters
TDocumentThe type of the document.