Method FindAndRemove
FindAndRemove(IMongoQuery, IMongoSortBy)
Finds one matching document using the query and sortBy parameters and removes it from this collection.
[Obsolete("Use the overload of FindAndRemove that has a FindAndRemoveArgs parameter instead.")]
public virtual FindAndModifyResult FindAndRemove(IMongoQuery query, IMongoSortBy sortBy)
Parameters
query
IMongoQueryThe query (usually a QueryDocument or constructed using the Query builder).
sortBy
IMongoSortByThe sort order to select one of the matching documents.
Returns
FindAndRemove(FindAndRemoveArgs)
Finds one matching document using the supplied args and removes it from this collection.
public virtual FindAndModifyResult FindAndRemove(FindAndRemoveArgs args)
Parameters
args
FindAndRemoveArgsThe args.