Method Exists
Exists<TMember>(Expression<Func<TDocument, TMember>>)
Tests that an element of that name does or does not exist (see $exists).
public IMongoQuery Exists<TMember>(Expression<Func<TDocument, TMember>> memberExpression)
Parameters
memberExpression
Expression<Func<TDocument, TMember>>The member expression representing the element to test.
Returns
- IMongoQuery
An IMongoQuery.
Type Parameters
TMember
The member type.