Table of Contents

Method OfType

Namespace
MongoDB.Driver
Assembly
MongoDB.Driver.dll

OfType<TDerivedDocument>()

Returns a filtered collection that appears to contain only documents of the derived type. All operations using this filtered collection will automatically use discriminators as necessary.

IFilteredMongoCollection<TDerivedDocument> OfType<TDerivedDocument>() where TDerivedDocument : TDocument

Returns

IFilteredMongoCollection<TDerivedDocument>

A filtered collection.

Type Parameters

TDerivedDocument

The type of the derived document.