Table of Contents

Class DeleteRequest

Namespace
MongoDB.Driver.Core.Operations
Assembly
MongoDB.Driver.Core.dll

Represents a request to delete one or more documents.

public sealed class DeleteRequest : WriteRequest
Inheritance
DeleteRequest
Inherited Members

Constructors

DeleteRequest(BsonDocument)

Initializes a new instance of the DeleteRequest class.

public DeleteRequest(BsonDocument filter)

Parameters

filter BsonDocument

The filter.

Properties

Collation

Gets or sets the collation.

public Collation Collation { get; set; }

Property Value

Collation

Filter

Gets or sets the filter.

public BsonDocument Filter { get; }

Property Value

BsonDocument

Hint

Gets or sets the hint.

public BsonValue Hint { get; set; }

Property Value

BsonValue

Limit

Gets or sets a limit on the number of documents that should be deleted.

public int Limit { get; set; }

Property Value

int

A limit on the number of documents that should be deleted.

Remarks

The server only supports 0 or 1, and 0 means that all matching documents should be deleted.

Methods

IsRetryable(ConnectionDescription)

Determines whether the request is retryable on a given connection.

public override bool IsRetryable(ConnectionDescription connectionDescription)

Parameters

connectionDescription ConnectionDescription

The connection description.

Returns

bool

true if the request is retryable; otherwise, false.