Method OfType
| MongoDB CSharp Driver API Reference (original) (raw)
Namespace
Assembly
MongoDB.Driver.dll
OfType(IBsonSerializer)
Appends a match stage to the pipeline that matches derived documents and changes the result type to the derived type.
IAggregateFluent<TNewResult> OfType<TNewResult>(IBsonSerializer<TNewResult> newResultSerializer = null) where TNewResult : TResult
Parameters
newResultSerializer
IBsonSerializer
The new result serializer.
Returns
The fluent aggregate interface.
Type Parameters
TNewResult
The type of the derived documents.