Method Type
Type<TMember>(Expression<Func<TDocument, TMember>>, BsonType)
Tests that the type of the named element is equal to some type (see $type).
public IMongoQuery Type<TMember>(Expression<Func<TDocument, TMember>> memberExpression, BsonType type)
Parameters
memberExpression
Expression<Func<TDocument, TMember>>The member expression representing the element to test.
type
BsonTypeThe type to compare to.
Returns
- IMongoQuery
An IMongoQuery.
Type Parameters
TMember
The member type.
Type<TMember>(Expression<Func<TDocument, TMember>>, string)
Tests that the type of the named element is equal to some type (see $type).
public IMongoQuery Type<TMember>(Expression<Func<TDocument, TMember>> memberExpression, string type)
Parameters
memberExpression
Expression<Func<TDocument, TMember>>The member expression representing the element to test.
type
stringThe type to compare to.
Returns
- IMongoQuery
An IMongoQuery.
Type Parameters
TMember
The member type.
Type<TValue>(Expression<Func<TDocument, IEnumerable<TValue>>>, BsonType)
Tests that any of the values in the named array element is equal to some type (see $type).
public IMongoQuery Type<TValue>(Expression<Func<TDocument, IEnumerable<TValue>>> memberExpression, BsonType type)
Parameters
memberExpression
Expression<Func<TDocument, IEnumerable<TValue>>>The member expression representing the element to test.
type
BsonTypeThe type to compare to.
Returns
- IMongoQuery
An IMongoQuery.
Type Parameters
TValue
The type of the value.
Type<TValue>(Expression<Func<TDocument, IEnumerable<TValue>>>, string)
Tests that any of the values in the named array element is equal to some type (see $type).
public IMongoQuery Type<TValue>(Expression<Func<TDocument, IEnumerable<TValue>>> memberExpression, string type)
Parameters
memberExpression
Expression<Func<TDocument, IEnumerable<TValue>>>The member expression representing the element to test.
type
stringThe type to compare to.
Returns
- IMongoQuery
An IMongoQuery.
Type Parameters
TValue
The type of the value.