Click or drag to resize
QueryBuilderTDocument Class
Aids in building mongo queries based on type information.
Inheritance Hierarchy
SystemObject
  MongoDB.Driver.BuildersQueryBuilderTDocument

Namespace: MongoDB.Driver.Builders
Assembly: MongoDB.Driver.Legacy (in MongoDB.Driver.Legacy.dll) Version: 2.0.1
Syntax
public class QueryBuilder<TDocument>

Type Parameters

TDocument
The type of the document.

The QueryBuilderTDocument type exposes the following members.

Constructors
  NameDescription
Public methodQueryBuilderTDocument
Initializes a new instance of the QueryBuilderTDocument class.
Top
Methods
  NameDescription
Public methodAllTValue
Tests that the named array element contains all of the values (see $all).
Public methodAnd(IMongoQuery)
Tests that all the queries are true (see $and in newer versions of the server).
Public methodAnd(IEnumerableIMongoQuery)
Tests that all the queries are true (see $and in newer versions of the server).
Public methodElemMatchTValue
Tests that at least one item of the named array element matches a query (see $elemMatch).
Public methodEQTValue(ExpressionFuncTDocument, IEnumerableTValue, TValue)
Tests that any of the values in the named array element is equal to some value.
Public methodEQTMember(ExpressionFuncTDocument, TMember, TMember)
Tests that the value of the named element is equal to some value.
Public methodEquals
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Public methodExistsTMember
Tests that an element of that name does or does not exist (see $exists).
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGeoIntersectsTMember, TCoordinates
Tests that a location element specified by name intersects with the geometry (see $geoIntersects).
Public methodGetHashCode
Serves as a hash function for a particular type.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodGTTValue(ExpressionFuncTDocument, IEnumerableTValue, TValue)
Tests that any of the values in the named array element is greater than some value (see $lt).
Public methodGTTMember(ExpressionFuncTDocument, TMember, TMember)
Tests that the value of the named element is greater than some value (see $gt).
Public methodGTETValue(ExpressionFuncTDocument, IEnumerableTValue, TValue)
Tests that any of the values in the named array element is greater than or equal to some value (see $gte).
Public methodGTETMember(ExpressionFuncTDocument, TMember, TMember)
Tests that the value of the named element is greater than or equal to some value (see $gte).
Public methodInTValue(ExpressionFuncTDocument, IEnumerableTValue, IEnumerableTValue)
Tests that any of the values in the named array element are equal to one of a list of values (see $in).
Public methodInTMember(ExpressionFuncTDocument, TMember, IEnumerableTMember)
Tests that the value of the named element is equal to one of a list of values (see $in).
Public methodLTTValue(ExpressionFuncTDocument, IEnumerableTValue, TValue)
Tests that any of the values in the named array element is less than some value (see $lt).
Public methodLTTMember(ExpressionFuncTDocument, TMember, TMember)
Tests that the value of the named element is less than some value (see $lt).
Public methodLTETValue(ExpressionFuncTDocument, IEnumerableTValue, TValue)
Tests that any of the values in the named array element is less than or equal to some value (see $lte).
Public methodLTETMember(ExpressionFuncTDocument, TMember, TMember)
Tests that the value of the named element is less than or equal to some value (see $lte).
Public methodMatches(ExpressionFuncTDocument, IEnumerableString, BsonRegularExpression)
Tests that any of the values in the named array element matches a regular expression (see $regex).
Public methodMatches(ExpressionFuncTDocument, String, BsonRegularExpression)
Tests that the value of the named element matches a regular expression (see $regex).
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodMod(ExpressionFuncTDocument, IEnumerableInt32, Int64, Int64)
Tests that the any of the values in the named array element match some value (see $mod).
Public methodMod(ExpressionFuncTDocument, Int32, Int64, Int64)
Tests that the modulus of the value of the named element matches some value (see $mod).
Public methodNETValue(ExpressionFuncTDocument, IEnumerableTValue, TValue)
Tests that none of the values in the named array element is equal to some value (see $ne).
Public methodNETMember(ExpressionFuncTDocument, TMember, TMember)
Tests that an element does not equal the value (see $ne).
Public methodNearTMember(ExpressionFuncTDocument, TMember, Double, Double)
Tests that the value of the named element is near some location (see $near).
Public methodNearTMember(ExpressionFuncTDocument, TMember, Double, Double, Double)
Tests that the value of the named element is near some location (see $near).
Public methodNearTMember(ExpressionFuncTDocument, TMember, Double, Double, Double, Boolean)
Tests that the value of the named element is near some location (see $near).
Public methodNearTMember, TCoordinates(ExpressionFuncTDocument, TMember, GeoJsonPointTCoordinates)
Tests that the value of the named element is near a point (see $near).
Public methodNearTMember, TCoordinates(ExpressionFuncTDocument, TMember, GeoJsonPointTCoordinates, Double)
Tests that the value of the named element is near some location (see $near).
Public methodNearTMember, TCoordinates(ExpressionFuncTDocument, TMember, GeoJsonPointTCoordinates, Double, Boolean)
Tests that the value of the named element is near some location (see $near).
Public methodNot
Tests that the inverse of the query is true (see $not).
Public methodNotExistsTMember
Tests that an element of that name does not exist (see $exists).
Public methodNotInTValue(ExpressionFuncTDocument, IEnumerableTValue, IEnumerableTValue)
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 methodNotInTMember(ExpressionFuncTDocument, TMember, IEnumerableTMember)
Tests that the value of the named element is not equal to any item in a list of values (see $nin).
Public methodOr(IMongoQuery)
Tests that at least one of the subqueries is true (see $or).
Public methodOr(IEnumerableIMongoQuery)
Tests that at least one of the subqueries is true (see $or).
Public methodSizeTValue
Tests that the size of the named array is equal to some value (see $size).
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Public methodTypeTValue(ExpressionFuncTDocument, IEnumerableTValue, BsonType)
Tests that any of the values in the named array element is equal to some type (see $type).
Public methodTypeTMember(ExpressionFuncTDocument, TMember, BsonType)
Tests that the type of the named element is equal to some type (see $type).
Public methodWhere
Builds a query from an expression.
Public methodWithinTMember, TCoordinates
Tests that the value of the named element is within the specified geometry (see $within).
Public methodWithinCircleTMember(ExpressionFuncTDocument, TMember, Double, Double, Double)
Tests that the value of the named element is within a circle (see $within and $center).
Public methodWithinCircleTMember(ExpressionFuncTDocument, TMember, Double, Double, Double, Boolean)
Tests that the value of the named element is within a circle (see $within and $center).
Public methodWithinPolygonTMember
Tests that the value of the named element is within a polygon (see $within and $polygon).
Public methodWithinRectangleTMember
Tests that the value of the named element is within a rectangle (see $within and $box).
Top
Extension Methods
  NameDescription
Public Extension MethodToBson
Serializes an object to a BSON byte array.
(Defined by BsonExtensionMethods.)
Public Extension MethodToBsonDocument
Serializes an object to a BsonDocument.
(Defined by BsonExtensionMethods.)
Public Extension MethodToJson
Serializes an object to a JSON string.
(Defined by BsonExtensionMethods.)
Top
See Also