Click or drag to resize

FilterDefinitionBuilder<TDocument> Class

Inheritance Hierarchy
System.Object
  MongoDB.Driver.FilterDefinitionBuilder<TDocument>

Namespace:  MongoDB.Driver
Assembly:  MongoDB.Driver (in MongoDB.Driver.dll) Version: 2.22.0+75246110ed1247226fcc7f8eb2c54ffab745693e
Syntax
public sealed class FilterDefinitionBuilder<TDocument>

Type Parameters

TDocument
The type of the document.

The FilterDefinitionBuilder<TDocument> type exposes the following members.

Constructors
  NameDescription
Public methodFilterDefinitionBuilder<TDocument>
Initializes a new instance of the FilterDefinitionBuilder<TDocument> class
Top
Properties
  NameDescription
Public propertyEmpty
Gets an empty filter. An empty filter matches everything.
Top
Methods
  NameDescription
Public methodAll<TItem>(Expression<Func<TDocument, IEnumerable<TItem>>>, IEnumerable<TItem>)
Creates an all filter for an array field.
Public methodAll<TItem>(FieldDefinition<TDocument>, IEnumerable<TItem>)
Creates an all filter for an array field.
Public methodAnd(FilterDefinition<TDocument>[])
Creates an and filter.
Public methodAnd(IEnumerable<FilterDefinition<TDocument>>)
Creates an and filter.
Public methodAnyEq<TItem>(Expression<Func<TDocument, IEnumerable<TItem>>>, TItem)
Creates an equality filter for an array field.
Public methodAnyEq<TItem>(FieldDefinition<TDocument>, TItem)
Creates an equality filter for an array field.
Public methodAnyGt<TItem>(Expression<Func<TDocument, IEnumerable<TItem>>>, TItem)
Creates a greater than filter for an array field.
Public methodAnyGt<TItem>(FieldDefinition<TDocument>, TItem)
Creates a greater than filter for an array field.
Public methodAnyGte<TItem>(Expression<Func<TDocument, IEnumerable<TItem>>>, TItem)
Creates a greater than or equal filter for an array field.
Public methodAnyGte<TItem>(FieldDefinition<TDocument>, TItem)
Creates a greater than or equal filter for an array field.
Public methodAnyIn<TItem>(Expression<Func<TDocument, IEnumerable<TItem>>>, IEnumerable<TItem>)
Creates an in filter for an array field.
Public methodAnyIn<TItem>(FieldDefinition<TDocument>, IEnumerable<TItem>)
Creates an in filter for an array field.
Public methodAnyLt<TItem>(Expression<Func<TDocument, IEnumerable<TItem>>>, TItem)
Creates a less than filter for an array field.
Public methodAnyLt<TItem>(FieldDefinition<TDocument>, TItem)
Creates a less than filter for an array field.
Public methodAnyLte<TItem>(Expression<Func<TDocument, IEnumerable<TItem>>>, TItem)
Creates a less than or equal filter for an array field.
Public methodAnyLte<TItem>(FieldDefinition<TDocument>, TItem)
Creates a less than or equal filter for an array field.
Public methodAnyNe<TItem>(Expression<Func<TDocument, IEnumerable<TItem>>>, TItem)
Creates a not equal filter for an array field.
Public methodAnyNe<TItem>(FieldDefinition<TDocument>, TItem)
Creates a not equal filter for an array field.
Public methodAnyNin<TItem>(Expression<Func<TDocument, IEnumerable<TItem>>>, IEnumerable<TItem>)
Creates a not in filter for an array field.
Public methodAnyNin<TItem>(FieldDefinition<TDocument>, IEnumerable<TItem>)
Creates a not in filter for an array field.
Public methodAnyStringIn(Expression<Func<TDocument, IEnumerable<String>>>,StringOrRegularExpression[])
Creates an in filter for a string array field.
Public methodAnyStringIn(Expression<Func<TDocument, IEnumerable<String>>>, IEnumerable<StringOrRegularExpression>)
Creates an in filter for a string array field.
Public methodAnyStringIn(FieldDefinition<TDocument, IEnumerable<String>>,StringOrRegularExpression[])
Creates an in filter for a string array field.
Public methodAnyStringIn(FieldDefinition<TDocument, IEnumerable<String>>, IEnumerable<StringOrRegularExpression>)
Creates an in filter for a string array field.
Public methodAnyStringNin(Expression<Func<TDocument, IEnumerable<String>>>,StringOrRegularExpression[])
Creates a not in filter for a string array field.
Public methodAnyStringNin(Expression<Func<TDocument, IEnumerable<String>>>, IEnumerable<StringOrRegularExpression>)
Creates a not in filter for a string array field.
Public methodAnyStringNin(FieldDefinition<TDocument, IEnumerable<String>>,StringOrRegularExpression[])
Creates a not in filter for a string array field.
Public methodAnyStringNin(FieldDefinition<TDocument, IEnumerable<String>>, IEnumerable<StringOrRegularExpression>)
Creates a not in filter for a string array field.
Public methodBitsAllClear(Expression<Func<TDocument, Object>>, Int64)
Creates a bits all clear filter.
Public methodBitsAllClear(FieldDefinition<TDocument>, Int64)
Creates a bits all clear filter.
Public methodBitsAllSet(Expression<Func<TDocument, Object>>, Int64)
Creates a bits all set filter.
Public methodBitsAllSet(FieldDefinition<TDocument>, Int64)
Creates a bits all set filter.
Public methodBitsAnyClear(Expression<Func<TDocument, Object>>, Int64)
Creates a bits any clear filter.
Public methodBitsAnyClear(FieldDefinition<TDocument>, Int64)
Creates a bits any clear filter.
Public methodBitsAnySet(Expression<Func<TDocument, Object>>, Int64)
Creates a bits any set filter.
Public methodBitsAnySet(FieldDefinition<TDocument>, Int64)
Creates a bits any set filter.
Public methodElemMatch<TItem>(Expression<Func<TDocument, IEnumerable<TItem>>>, FilterDefinition<TItem>)
Creates an element match filter for an array field.
Public methodElemMatch<TItem>(Expression<Func<TDocument, IEnumerable<TItem>>>, Expression<Func<TItem, Boolean>>)
Creates an element match filter for an array field.
Public methodElemMatch<TItem>(FieldDefinition<TDocument>, FilterDefinition<TItem>)
Creates an element match filter for an array field.
Public methodEq<TField>(Expression<Func<TDocument, TField>>, TField)
Creates an equality filter.
Public methodEq<TField>(FieldDefinition<TDocument, TField>, TField)
Creates an equality filter.
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Public methodExists(Expression<Func<TDocument, Object>>, Boolean)
Creates an exists filter.
Public methodExists(FieldDefinition<TDocument>, Boolean)
Creates an exists filter.
Public methodGeoIntersects<TCoordinates>(Expression<Func<TDocument, Object>>, GeoJsonGeometry<TCoordinates>)
Creates a geo intersects filter.
Public methodGeoIntersects<TCoordinates>(FieldDefinition<TDocument>, GeoJsonGeometry<TCoordinates>)
Creates a geo intersects filter.
Public methodGeoWithin<TCoordinates>(Expression<Func<TDocument, Object>>, GeoJsonGeometry<TCoordinates>)
Creates a geo within filter.
Public methodGeoWithin<TCoordinates>(FieldDefinition<TDocument>, GeoJsonGeometry<TCoordinates>)
Creates a geo within filter.
Public methodGeoWithinBox(Expression<Func<TDocument, Object>>, Double, Double, Double, Double)
Creates a geo within box filter.
Public methodGeoWithinBox(FieldDefinition<TDocument>, Double, Double, Double, Double)
Creates a geo within box filter.
Public methodGeoWithinCenter(Expression<Func<TDocument, Object>>, Double, Double, Double)
Creates a geo within center filter.
Public methodGeoWithinCenter(FieldDefinition<TDocument>, Double, Double, Double)
Creates a geo within center filter.
Public methodGeoWithinCenterSphere(Expression<Func<TDocument, Object>>, Double, Double, Double)
Creates a geo within center sphere filter.
Public methodGeoWithinCenterSphere(FieldDefinition<TDocument>, Double, Double, Double)
Creates a geo within center sphere filter.
Public methodGeoWithinPolygon(Expression<Func<TDocument, Object>>,Double[,])
Creates a geo within polygon filter.
Public methodGeoWithinPolygon(FieldDefinition<TDocument>,Double[,])
Creates a geo within polygon filter.
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodGt(Expression<Func<TDocument, UInt32>>, UInt32)
Creates a greater than filter for a UInt32 field.
Public methodGt(Expression<Func<TDocument, UInt64>>, UInt64)
Creates a greater than filter for a UInt64 field.
Public methodGt(FieldDefinition<TDocument, UInt32>, UInt32)
Creates a greater than filter for a UInt32 field.
Public methodGt(FieldDefinition<TDocument, UInt64>, UInt64)
Creates a greater than filter for a UInt64 field.
Public methodGt<TField>(Expression<Func<TDocument, TField>>, TField)
Creates a greater than filter.
Public methodGt<TField>(FieldDefinition<TDocument, TField>, TField)
Creates a greater than filter.
Public methodGte(Expression<Func<TDocument, UInt32>>, UInt32)
Creates a greater than or equal filter for a UInt32 field.
Public methodGte(Expression<Func<TDocument, UInt64>>, UInt64)
Creates a greater than or equal filter for a UInt64 field.
Public methodGte(FieldDefinition<TDocument, UInt32>, UInt32)
Creates a greater than or equal filter for a UInt32 field.
Public methodGte(FieldDefinition<TDocument, UInt64>, UInt64)
Creates a greater than or equal filter for a UInt64 field.
Public methodGte<TField>(Expression<Func<TDocument, TField>>, TField)
Creates a greater than or equal filter.
Public methodGte<TField>(FieldDefinition<TDocument, TField>, TField)
Creates a greater than or equal filter.
Public methodIn<TField>(Expression<Func<TDocument, TField>>, IEnumerable<TField>)
Creates an in filter.
Public methodIn<TField>(FieldDefinition<TDocument, TField>, IEnumerable<TField>)
Creates an in filter.
Public methodJsonSchema
Creates a json schema filter.
Public methodLt(Expression<Func<TDocument, UInt32>>, UInt32)
Creates a less than filter for a UInt32 field.
Public methodLt(Expression<Func<TDocument, UInt64>>, UInt64)
Creates a less than filter for a UInt64 field.
Public methodLt(FieldDefinition<TDocument, UInt32>, UInt32)
Creates a less than filter for a UInt32 field.
Public methodLt(FieldDefinition<TDocument, UInt64>, UInt64)
Creates a less than filter for a UInt64 field.
Public methodLt<TField>(Expression<Func<TDocument, TField>>, TField)
Creates a less than filter.
Public methodLt<TField>(FieldDefinition<TDocument, TField>, TField)
Creates a less than filter.
Public methodLte(Expression<Func<TDocument, UInt32>>, UInt32)
Creates a less than or equal filter for a UInt32 field.
Public methodLte(Expression<Func<TDocument, UInt64>>, UInt64)
Creates a less than or equal filter for a UInt64 field.
Public methodLte(FieldDefinition<TDocument, UInt32>, UInt32)
Creates a less than or equal filter for a UInt32 field.
Public methodLte(FieldDefinition<TDocument, UInt64>, UInt64)
Creates a less than or equal filter for a UInt64 field.
Public methodLte<TField>(Expression<Func<TDocument, TField>>, TField)
Creates a less than or equal filter.
Public methodLte<TField>(FieldDefinition<TDocument, TField>, TField)
Creates a less than or equal filter.
Public methodMod(Expression<Func<TDocument, Object>>, Int64, Int64)
Creates a modulo filter.
Public methodMod(FieldDefinition<TDocument>, Int64, Int64)
Creates a modulo filter.
Public methodNe<TField>(Expression<Func<TDocument, TField>>, TField)
Creates a not equal filter.
Public methodNe<TField>(FieldDefinition<TDocument, TField>, TField)
Creates a not equal filter.
Public methodNear(Expression<Func<TDocument, Object>>, Double, Double, Nullable<Double>, Nullable<Double>)
Creates a near filter.
Public methodNear(FieldDefinition<TDocument>, Double, Double, Nullable<Double>, Nullable<Double>)
Creates a near filter.
Public methodNear<TCoordinates>(Expression<Func<TDocument, Object>>, GeoJsonPoint<TCoordinates>, Nullable<Double>, Nullable<Double>)
Creates a near filter.
Public methodNear<TCoordinates>(FieldDefinition<TDocument>, GeoJsonPoint<TCoordinates>, Nullable<Double>, Nullable<Double>)
Creates a near filter.
Public methodNearSphere(Expression<Func<TDocument, Object>>, Double, Double, Nullable<Double>, Nullable<Double>)
Creates a near sphere filter.
Public methodNearSphere(FieldDefinition<TDocument>, Double, Double, Nullable<Double>, Nullable<Double>)
Creates a near sphere filter.
Public methodNearSphere<TCoordinates>(Expression<Func<TDocument, Object>>, GeoJsonPoint<TCoordinates>, Nullable<Double>, Nullable<Double>)
Creates a near sphere filter.
Public methodNearSphere<TCoordinates>(FieldDefinition<TDocument>, GeoJsonPoint<TCoordinates>, Nullable<Double>, Nullable<Double>)
Creates a near sphere filter.
Public methodNin<TField>(Expression<Func<TDocument, TField>>, IEnumerable<TField>)
Creates a not in filter.
Public methodNin<TField>(FieldDefinition<TDocument, TField>, IEnumerable<TField>)
Creates a not in filter.
Public methodNot
Creates a not filter.
Public methodOfType<TDerived>()
Creates an OfType filter that matches documents of a derived type.
Public methodOfType<TDerived>(Expression<Func<TDerived, Boolean>>)
Creates an OfType filter that matches documents of a derived type and that also match a filter on the derived document.
Public methodOfType<TDerived>(FilterDefinition<TDerived>)
Creates an OfType filter that matches documents of a derived type and that also match a filter on the derived document.
Public methodOfType<TField, TDerived>(Expression<Func<TDocument, TField>>)
Creates an OfType filter that matches documents with a field of a derived type.
Public methodOfType<TField, TDerived>(FieldDefinition<TDocument, TField>)
Creates an OfType filter that matches documents with a field of a derived typer.
Public methodOfType<TField, TDerived>(Expression<Func<TDocument, TField>>, Expression<Func<TDerived, Boolean>>)
Creates an OfType filter that matches documents with a field of a derived type and that also match a filter on the derived field.
Public methodOfType<TField, TDerived>(FieldDefinition<TDocument, TField>, FilterDefinition<TDerived>)
Creates an OfType filter that matches documents with a field of a derived type and that also match a filter on the derived field.
Public methodOr(FilterDefinition<TDocument>[])
Creates an or filter.
Public methodOr(IEnumerable<FilterDefinition<TDocument>>)
Creates an or filter.
Public methodRegex(Expression<Func<TDocument, Object>>, BsonRegularExpression)
Creates a regular expression filter.
Public methodRegex(FieldDefinition<TDocument>, BsonRegularExpression)
Creates a regular expression filter.
Public methodSize(Expression<Func<TDocument, Object>>, Int32)
Creates a size filter.
Public methodSize(FieldDefinition<TDocument>, Int32)
Creates a size filter.
Public methodSizeGt(Expression<Func<TDocument, Object>>, Int32)
Creates a size greater than filter.
Public methodSizeGt(FieldDefinition<TDocument>, Int32)
Creates a size greater than filter.
Public methodSizeGte(Expression<Func<TDocument, Object>>, Int32)
Creates a size greater than or equal filter.
Public methodSizeGte(FieldDefinition<TDocument>, Int32)
Creates a size greater than or equal filter.
Public methodSizeLt(Expression<Func<TDocument, Object>>, Int32)
Creates a size less than filter.
Public methodSizeLt(FieldDefinition<TDocument>, Int32)
Creates a size less than filter.
Public methodSizeLte(Expression<Func<TDocument, Object>>, Int32)
Creates a size less than or equal filter.
Public methodSizeLte(FieldDefinition<TDocument>, Int32)
Creates a size less than or equal filter.
Public methodStringIn(Expression<Func<TDocument, String>>,StringOrRegularExpression[])
Creates an in filter for a string field.
Public methodStringIn(Expression<Func<TDocument, String>>, IEnumerable<StringOrRegularExpression>)
Creates an in filter for a string field.
Public methodStringIn(FieldDefinition<TDocument, String>,StringOrRegularExpression[])
Creates an in filter for a string field.
Public methodStringIn(FieldDefinition<TDocument, String>, IEnumerable<StringOrRegularExpression>)
Creates an in filter for a string field.
Public methodStringNin(Expression<Func<TDocument, String>>,StringOrRegularExpression[])
Creates a not in filter for a string field.
Public methodStringNin(Expression<Func<TDocument, String>>, IEnumerable<StringOrRegularExpression>)
Creates a not in filter for a string field.
Public methodStringNin(FieldDefinition<TDocument, String>,StringOrRegularExpression[])
Creates a not in filter for a string field.
Public methodStringNin(FieldDefinition<TDocument, String>, IEnumerable<StringOrRegularExpression>)
Creates a not in filter for a string field.
Public methodText(String, TextSearchOptions)
Creates a text filter.
Public methodText(String, String)
Creates a text filter.
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Public methodType(Expression<Func<TDocument, Object>>, BsonType)
Creates a type filter.
Public methodType(Expression<Func<TDocument, Object>>, String)
Creates a type filter.
Public methodType(FieldDefinition<TDocument>, BsonType)
Creates a type filter.
Public methodType(FieldDefinition<TDocument>, String)
Creates a type filter.
Public methodWhere
Creates a filter based on the expression.
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