Click or drag to resize
ProjectionDefinitionBuilder<TSource> Class
A builder for a projection.
Inheritance Hierarchy
System.Object
  MongoDB.Driver.ProjectionDefinitionBuilder<TSource>

Namespace: MongoDB.Driver
Assembly: MongoDB.Driver (in MongoDB.Driver.dll) Version: 2.4.1
Syntax
public sealed class ProjectionDefinitionBuilder<TSource>

Type Parameters

TSource
The type of the source.

The ProjectionDefinitionBuilder< TSource> type exposes the following members.

Constructors
  NameDescription
Public methodProjectionDefinitionBuilder<TSource>
Initializes a new instance of the ProjectionDefinitionBuilder< TSource> class
Top
Methods
  NameDescription
Public methodAs<TProjection>
Creates a client side projection that is implemented solely by using a different serializer.
Public methodCombine(ProjectionDefinition<TSource>[])
Combines the specified projections.
Public methodCombine(IEnumerable<ProjectionDefinition<TSource>>)
Combines the specified projections.
Public methodElemMatch<TItem>(Expression<Func<TSource, IEnumerable<TItem>>>, FilterDefinition<TItem>)
Creates a projection that filters the contents of an array.
Public methodElemMatch<TItem>(Expression<Func<TSource, IEnumerable<TItem>>>, Expression<Func<TItem, Boolean>>)
Creates a projection that filters the contents of an array.
Public methodElemMatch<TItem>(FieldDefinition<TSource>, FilterDefinition<TItem>)
Creates a projection that filters the contents of an array.
Public methodObject.)
Public methodExclude(Expression<Func<TSource, Object>>)
Creates a projection that excludes a field.
Public methodExclude(FieldDefinition<TSource>)
Creates a projection that excludes a field.
Public methodExpression<TProjection>
Creates a projection based on the expression.
Public methodObject.)
Public methodInclude(Expression<Func<TSource, Object>>)
Creates a projection that includes a field.
Public methodInclude(FieldDefinition<TSource>)
Creates a projection that includes a field.
Public methodMetaTextScore
Creates a text score projection.
Public methodSlice(Expression<Func<TSource, Object>>, Int32, Nullable<Int32>)
Creates an array slice projection.
Public methodSlice(FieldDefinition<TSource>, Int32, Nullable<Int32>)
Creates an array slice projection.
Public methodObject.)
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

Follow Lee on X/Twitter - Father, Husband, Serial builder creating AI, crypto, games & web tools. We are friends :) AI Will Come To Life!

Check out: eBank.nz (Art Generator) | Netwrck.com (AI Tools) | Text-Generator.io (AI API) | BitBank.nz (Crypto AI) | ReadingTime (Kids Reading) | RewordGame | BigMultiplayerChess | WebFiddle | How.nz | Helix AI Assistant