Method OfType
OfType<TNewResult>(IBsonSerializer<TNewResult>)
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 <TNewResult>The new result serializer.
Returns
- IAggregate
Fluent <TNewResult> The fluent aggregate interface.
Type Parameters
TNewResult
The type of the derived documents.