Table of Contents

Method GetResultsAs

Namespace
MongoDB.Driver
Assembly
MongoDB.Driver.Legacy.dll

GetResultsAs<TDocument>()

Gets the results as TDocuments (either inline or fetched from the output collection).

public IEnumerable<TDocument> GetResultsAs<TDocument>()

Returns

IEnumerable<TDocument>

The documents.

Type Parameters

TDocument

The type of the documents.

GetResultsAs(Type)

Gets the results as TDocuments (either inline or fetched from the output collection).

public IEnumerable<object> GetResultsAs(Type documentType)

Parameters

documentType Type

The type of the documents.

Returns

IEnumerable<object>

The documents.