Table of Contents

Method Remove

Namespace
MongoDB.Driver
Assembly
MongoDB.Driver.Legacy.dll

Remove(IMongoQuery)

Removes documents from this collection that match a query.

public virtual WriteConcernResult Remove(IMongoQuery query)

Parameters

query IMongoQuery

The query (usually a QueryDocument or constructed using the Query builder).

Returns

WriteConcernResult

A WriteConcernResult (or null if WriteConcern is disabled).

Remove(IMongoQuery, WriteConcern)

Removes documents from this collection that match a query.

public virtual WriteConcernResult Remove(IMongoQuery query, WriteConcern writeConcern)

Parameters

query IMongoQuery

The query (usually a QueryDocument or constructed using the Query builder).

writeConcern WriteConcern

The write concern to use for this Insert.

Returns

WriteConcernResult

A WriteConcernResult (or null if WriteConcern is disabled).

Remove(IMongoQuery, RemoveFlags)

Removes documents from this collection that match a query.

public virtual WriteConcernResult Remove(IMongoQuery query, RemoveFlags flags)

Parameters

query IMongoQuery

The query (usually a QueryDocument or constructed using the Query builder).

flags RemoveFlags

The flags for this Remove (see RemoveFlags).

Returns

WriteConcernResult

A WriteConcernResult (or null if WriteConcern is disabled).

Remove(IMongoQuery, RemoveFlags, WriteConcern)

Removes documents from this collection that match a query.

public virtual WriteConcernResult Remove(IMongoQuery query, RemoveFlags flags, WriteConcern writeConcern)

Parameters

query IMongoQuery

The query (usually a QueryDocument or constructed using the Query builder).

flags RemoveFlags

The flags for this Remove (see RemoveFlags).

writeConcern WriteConcern

The write concern to use for this Insert.

Returns

WriteConcernResult

A WriteConcernResult (or null if WriteConcern is disabled).

Remove(RemoveArgs)

Removes documents from this collection that match a query.

public virtual WriteConcernResult Remove(RemoveArgs args)

Parameters

args RemoveArgs

The arguments.

Returns

WriteConcernResult

A WriteConcernResult (or null if WriteConcern is disabled).