Method Documents

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

Namespace

MongoDB.Driver.Linq

Assembly

MongoDB.Driver.dll

Documents(IQueryable, params TDocument[])

Injects a sequence of documents at the beginning of a pipeline.

public static IQueryable<TDocument> Documents<TDocument>(this IQueryable<NoPipelineInput> source, params TDocument[] documents)

Parameters

source IQueryable<NoPipelineInput>

An IQueryable with no other input.

documents TDocument[]

The documents.

Returns

IQueryable

An IQueryable whose elements are the documents.

Type Parameters

TDocument

The type of the documents.

Documents(IQueryable, IEnumerable, IBsonSerializer)

Injects a sequence of documents at the beginning of a pipeline.

public static IQueryable<TDocument> Documents<TDocument>(this IQueryable<NoPipelineInput> source, IEnumerable<TDocument> documents, IBsonSerializer<TDocument> documentSerializer)

Parameters

source IQueryable<NoPipelineInput>

An IQueryable with no other input.

documents IEnumerable

The documents.

documentSerializer IBsonSerializer

The document serializer.

Returns

IQueryable

An IQueryable whose elements are the documents.

Type Parameters

TDocument

The type of the documents.