Method FetchDBRefAs
FetchDBRefAs<TDocument>(MongoDBRef)
Fetches the document referred to by the DBRef, deserialized as a TDocument
.
public virtual TDocument FetchDBRefAs<TDocument>(MongoDBRef dbRef)
Parameters
dbRef
MongoDBRefThe 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
TypeThe nominal type of the document to fetch.
dbRef
MongoDBRefThe MongoDBRef to fetch.
Returns
- object
An instance of nominalType (or null if the document was not found).