Table of Contents

Method NE

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

NE<TMember>(Expression<Func<TDocument, TMember>>, TMember)

Tests that an element does not equal the value (see $ne).

public IMongoQuery NE<TMember>(Expression<Func<TDocument, TMember>> memberExpression, TMember value)

Parameters

memberExpression Expression<Func<TDocument, TMember>>

The member expression.

value TMember

The value.

Returns

IMongoQuery

An IMongoQuery.

Type Parameters

TMember

The member type.

NE<TValue>(Expression<Func<TDocument, IEnumerable<TValue>>>, TValue)

Tests that none of the values in the named array element is equal to some value (see $ne).

public IMongoQuery NE<TValue>(Expression<Func<TDocument, IEnumerable<TValue>>> memberExpression, TValue value)

Parameters

memberExpression Expression<Func<TDocument, IEnumerable<TValue>>>

The member expression representing the element to test.

value TValue

The value to compare to.

Returns

IMongoQuery

An IMongoQuery.

Type Parameters

TValue

The type of the value.