Method OfType
OfType<TResult>(IMongoQueryable)
Filters the elements of an IMongoQueryable based on a specified type.
public static IMongoQueryable<TResult> OfType<TResult>(this IMongoQueryable source)
Parameters
source
IMongoQueryableAn IMongoQueryable whose elements to filter.
Returns
- IMongoQueryable<TResult>
A collection that contains the elements from
source
that have typeTResult
.
Type Parameters
TResult
The type to filter the elements of the sequence on.