Method Find
Find<TDocument>(IMongoCollection<TDocument>, FilterDefinition<TDocument>, FindOptions)
Begins a fluent find interface.
public static IFindFluent<TDocument, TDocument> Find<TDocument>(this IMongoCollection<TDocument> collection, FilterDefinition<TDocument> filter, FindOptions options = null)
Parameters
collection
IMongoCollection<TDocument>The collection.
filter
FilterDefinition<TDocument>The filter.
options
FindOptionsThe options.
Returns
- IFindFluent<TDocument, TDocument>
A fluent find interface.
Type Parameters
TDocument
The type of the document.
Find<TDocument>(IMongoCollection<TDocument>, IClientSessionHandle, FilterDefinition<TDocument>, FindOptions)
Begins a fluent find interface.
public static IFindFluent<TDocument, TDocument> Find<TDocument>(this IMongoCollection<TDocument> collection, IClientSessionHandle session, FilterDefinition<TDocument> filter, FindOptions options = null)
Parameters
collection
IMongoCollection<TDocument>The collection.
session
IClientSessionHandleThe session.
filter
FilterDefinition<TDocument>The filter.
options
FindOptionsThe options.
Returns
- IFindFluent<TDocument, TDocument>
A fluent find interface.
Type Parameters
TDocument
The type of the document.
Find<TDocument>(IMongoCollection<TDocument>, Expression<Func<TDocument, bool>>, FindOptions)
Begins a fluent find interface.
public static IFindFluent<TDocument, TDocument> Find<TDocument>(this IMongoCollection<TDocument> collection, Expression<Func<TDocument, bool>> filter, FindOptions options = null)
Parameters
collection
IMongoCollection<TDocument>The collection.
filter
Expression<Func<TDocument, bool>>The filter.
options
FindOptionsThe options.
Returns
- IFindFluent<TDocument, TDocument>
A fluent interface.
Type Parameters
TDocument
The type of the document.
Find<TDocument>(IMongoCollection<TDocument>, IClientSessionHandle, Expression<Func<TDocument, bool>>, FindOptions)
Begins a fluent find interface.
public static IFindFluent<TDocument, TDocument> Find<TDocument>(this IMongoCollection<TDocument> collection, IClientSessionHandle session, Expression<Func<TDocument, bool>> filter, FindOptions options = null)
Parameters
collection
IMongoCollection<TDocument>The collection.
session
IClientSessionHandleThe session.
filter
Expression<Func<TDocument, bool>>The filter.
options
FindOptionsThe options.
Returns
- IFindFluent<TDocument, TDocument>
A fluent interface.
Type Parameters
TDocument
The type of the document.