Table of Contents

Method Exists

Namespace
MongoDB.Driver.Builders
Assembly
MongoDB.Driver.Legacy.dll

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.