Click or drag to resize
Query<TDocument> Class
Aids in building mongo queries based on type information.
Inheritance Hierarchy
System.Object
  MongoDB.Driver.Builders.Query<TDocument>

Namespace: MongoDB.Driver.Builders
Assembly: MongoDB.Driver.Legacy (in MongoDB.Driver.Legacy.dll) Version: 2.1.0
Syntax
public static class Query<TDocument>

Type Parameters

TDocument
The type of the document.

The Query< TDocument> type exposes the following members.

Methods
  NameDescription
Public methodStatic memberAll<TValue>
Tests that the named array element contains all of the values (see $all).
Public methodStatic memberElemMatch<TValue>
Tests that at least one item of the named array element matches a query (see $elemMatch).
Public methodStatic memberEQ<TValue>(Expression<Func<TDocument, IEnumerable<TValue>>>, TValue)
Tests that any of the values in the named array element is equal to some value.
Public methodStatic memberEQ<TMember>(Expression<Func<TDocument, TMember>>, TMember)
Tests that the value of the named element is equal to some value.
Public methodStatic memberExists<TMember>
Tests that an element of that name does or does not exist (see $exists).
Public methodStatic memberGeoIntersects<TMember, TCoordinates>
Tests that a location element specified by name intersects with the geometry (see $geoIntersects).
Public methodStatic memberGT<TValue>(Expression<Func<TDocument, IEnumerable<TValue>>>, TValue)
Tests that any of the values in the named array element is greater than some value (see $lt).
Public methodStatic memberGT<TMember>(Expression<Func<TDocument, TMember>>, TMember)
Tests that the value of the named element is greater than some value (see $gt).
Public methodStatic memberGTE<TValue>(Expression<Func<TDocument, IEnumerable<TValue>>>, TValue)
Tests that any of the values in the named array element is greater than or equal to some value (see $gte).
Public methodStatic memberGTE<TMember>(Expression<Func<TDocument, TMember>>, TMember)
Tests that the value of the named element is greater than or equal to some value (see $gte).
Public methodStatic memberIn<TValue>(Expression<Func<TDocument, IEnumerable<TValue>>>, IEnumerable<TValue>)
Tests that any of the values in the named array element are equal to one of a list of values (see $in).
Public methodStatic memberIn<TMember>(Expression<Func<TDocument, TMember>>, IEnumerable<TMember>)
Tests that the value of the named element is equal to one of a list of values (see $in).
Public methodStatic memberLT<TValue>(Expression<Func<TDocument, IEnumerable<TValue>>>, TValue)
Tests that any of the values in the named array element is less than some value (see $lt).
Public methodStatic memberLT<TMember>(Expression<Func<TDocument, TMember>>, TMember)
Tests that the value of the named element is less than some value (see $lt).
Public methodStatic memberLTE<TValue>(Expression<Func<TDocument, IEnumerable<TValue>>>, TValue)
Tests that any of the values in the named array element is less than or equal to some value (see $lte).
Public methodStatic memberLTE<TMember>(Expression<Func<TDocument, TMember>>, TMember)
Tests that the value of the named element is less than or equal to some value (see $lte).
Public methodStatic memberMatches(Expression<Func<TDocument, IEnumerable<String>>>, BsonRegularExpression)
Tests that any of the values in the named array element matches a regular expression (see $regex).
Public methodStatic memberMatches(Expression<Func<TDocument, String>>, BsonRegularExpression)
Tests that the value of the named element matches a regular expression (see $regex).
Public methodStatic memberMod(Expression<Func<TDocument, IEnumerable<Int32>>>, Int64, Int64)
Tests that the any of the values in the named array element match some value (see $mod).
Public methodStatic memberMod(Expression<Func<TDocument, Int32>>, Int64, Int64)
Tests that the modulus of the value of the named element matches some value (see $mod).
Public methodStatic memberNE<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 methodStatic memberNE<TMember>(Expression<Func<TDocument, TMember>>, TMember)
Tests that an element does not equal the value (see $ne).
Public methodStatic memberNear<TMember>(Expression<Func<TDocument, TMember>>, Double, Double)
Tests that the value of the named element is near some location (see $near).
Public methodStatic memberNear<TMember>(Expression<Func<TDocument, TMember>>, Double, Double, Double)
Tests that the value of the named element is near some location (see $near).
Public methodStatic memberNear<TMember>(Expression<Func<TDocument, TMember>>, Double, Double, Double, Boolean)
Tests that the value of the named element is near some location (see $near).
Public methodStatic memberNear<TMember, TCoordinates>(Expression<Func<TDocument, TMember>>, GeoJsonPoint<TCoordinates>)
Tests that the value of the named element is near a point (see $near).
Public methodStatic memberNear<TMember, TCoordinates>(Expression<Func<TDocument, TMember>>, GeoJsonPoint<TCoordinates>, Double)
Tests that the value of the named element is near some location (see $near).
Public methodStatic memberNear<TMember, TCoordinates>(Expression<Func<TDocument, TMember>>, GeoJsonPoint<TCoordinates>, Double, Boolean)
Tests that the value of the named element is near some location (see $near).
Public methodStatic memberNotExists<TMember>
Tests that an element of that name does not exist (see $exists).
Public methodStatic memberNotIn<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 methodStatic memberNotIn<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 methodStatic memberSize<TValue>
Tests that the size of the named array is equal to some value (see $size).
Public methodStatic memberType<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 methodStatic memberType<TMember>(Expression<Func<TDocument, TMember>>, BsonType)
Tests that the type of the named element is equal to some type (see $type).
Public methodStatic memberWhere
Builds a query from an expression.
Public methodStatic memberWithin<TMember, TCoordinates>
Tests that the value of the named element is within the specified geometry (see $within).
Public methodStatic memberWithinCircle<TMember>(Expression<Func<TDocument, TMember>>, Double, Double, Double)
Tests that the value of the named element is within a circle (see $within and $center).
Public methodStatic memberWithinCircle<TMember>(Expression<Func<TDocument, TMember>>, Double, Double, Double, Boolean)
Tests that the value of the named element is within a circle (see $within and $center).
Public methodStatic memberWithinPolygon<TMember>
Tests that the value of the named element is within a polygon (see $within and $polygon).
Public methodStatic memberWithinRectangle<TMember>
Tests that the value of the named element is within a rectangle (see $within and $box).
Top
See Also