MongoCollectionFindAndModify Method (IMongoQuery, IMongoSortBy, IMongoUpdate) |
Note: This API is now obsolete.
Finds one matching document using the query and sortBy parameters and applies the specified update to it.
Namespace:
MongoDB.Driver
Assembly:
MongoDB.Driver.Legacy (in MongoDB.Driver.Legacy.dll) Version: 2.7.3+Branch.v2.7.x.Sha.2f1f2be13a23b8520cb9c2ee8439c022f9a03efe
Syntax [ObsoleteAttribute("Use the overload of FindAndModify that has a FindAndModifyArgs parameter instead.")]
public virtual FindAndModifyResult FindAndModify(
IMongoQuery query,
IMongoSortBy sortBy,
IMongoUpdate update
)
<ObsoleteAttribute("Use the overload of FindAndModify that has a FindAndModifyArgs parameter instead.")>
Public Overridable Function FindAndModify (
query As IMongoQuery,
sortBy As IMongoSortBy,
update As IMongoUpdate
) As FindAndModifyResult
[<ObsoleteAttribute("Use the overload of FindAndModify that has a FindAndModifyArgs parameter instead.")>]
abstract FindAndModify :
query : IMongoQuery *
sortBy : IMongoSortBy *
update : IMongoUpdate -> FindAndModifyResult
[<ObsoleteAttribute("Use the overload of FindAndModify that has a FindAndModifyArgs parameter instead.")>]
override FindAndModify :
query : IMongoQuery *
sortBy : IMongoSortBy *
update : IMongoUpdate -> 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. - update
- Type: MongoDB.DriverIMongoUpdate
The update to apply to the matching document.
Return Value
Type:
FindAndModifyResultA
FindAndModifyResult.
See Also