MongoCollectionFindAndRemove Method (IMongoQuery, IMongoSortBy) |
Note: This API is now obsolete.
Finds one matching document using the query and sortBy parameters and removes it from this collection.
Namespace:
MongoDB.Driver
Assembly:
MongoDB.Driver.Legacy (in MongoDB.Driver.Legacy.dll) Version: 2.5.0+57.Branch.master.Sha.6a4e00a2d91090c65a9b11364b9ebfdb9c7da076
Syntax [ObsoleteAttribute("Use the overload of FindAndRemove that has a FindAndRemoveArgs parameter instead.")]
public virtual FindAndModifyResult FindAndRemove(
IMongoQuery query,
IMongoSortBy sortBy
)
<ObsoleteAttribute("Use the overload of FindAndRemove that has a FindAndRemoveArgs parameter instead.")>
Public Overridable Function FindAndRemove (
query As IMongoQuery,
sortBy As IMongoSortBy
) As FindAndModifyResult
[<ObsoleteAttribute("Use the overload of FindAndRemove that has a FindAndRemoveArgs parameter instead.")>]
abstract FindAndRemove :
query : IMongoQuery *
sortBy : IMongoSortBy -> FindAndModifyResult
[<ObsoleteAttribute("Use the overload of FindAndRemove that has a FindAndRemoveArgs parameter instead.")>]
override FindAndRemove :
query : IMongoQuery *
sortBy : IMongoSortBy -> FindAndModifyResult
Parameters
- query
- Type: MongoDB.DriverIMongoQuery
The query (usually a QueryDocument or constructed using the Query builder). - sortBy
- Type: MongoDB.DriverIMongoSortBy
The sort order to select one of the matching documents.
Return Value
Type:
FindAndModifyResultA
FindAndModifyResult.
See Also