Method NotIn
NotIn<TMember>(Expression<Func<TDocument, TMember>>, IEnumerable<TMember>)
Tests that the value of the named element is not equal to any item in a list of values (see $nin).
public IMongoQuery NotIn<TMember>(Expression<Func<TDocument, TMember>> memberExpression, IEnumerable<TMember> values)
Parameters
memberExpression
Expression<Func<TDocument, TMember>>The member expression representing the element to test.
values
IEnumerable<TMember>The values to compare to.
Returns
- IMongoQuery
An IMongoQuery.
Type Parameters
TMember
The member type.
NotIn<TValue>(Expression<Func<TDocument, IEnumerable<TValue>>>, IEnumerable<TValue>)
Tests that the none of the values of the named array element is equal to any item in a list of values (see $nin).
public IMongoQuery NotIn<TValue>(Expression<Func<TDocument, IEnumerable<TValue>>> memberExpression, IEnumerable<TValue> values)
Parameters
memberExpression
Expression<Func<TDocument, IEnumerable<TValue>>>The member expression.
values
IEnumerable<TValue>The values to compare.
Returns
- IMongoQuery
An IMongoQuery.
Type Parameters
TValue
The type of the enumerable member values.