Table of Contents

Method FetchDBRefAs

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

FetchDBRefAs<TDocument>(MongoDBRef)

Fetches the document referred to by the DBRef, deserialized as a TDocument.

public virtual TDocument FetchDBRefAs<TDocument>(MongoDBRef dbRef)

Parameters

dbRef MongoDBRef

The MongoDBRef to fetch.

Returns

TDocument

A TDocument (or null if the document was not found).

Type Parameters

TDocument

The nominal type of the document to fetch.

FetchDBRefAs(Type, MongoDBRef)

Fetches the document referred to by the DBRef.

public virtual object FetchDBRefAs(Type documentType, MongoDBRef dbRef)

Parameters

documentType Type

The nominal type of the document to fetch.

dbRef MongoDBRef

The MongoDBRef to fetch.

Returns

object

The document (or null if the document was not found).