findoneandupdateasync

197 views
Skip to first unread message

dale bliss

unread,
Apr 14, 2015, 11:51:24 AM4/14/15
to mongod...@googlegroups.com
Hey guys - new to mongodb - got a few things up and running.

I am having trouble updating a document 

is findoneandupdateasynce the best method to use?

Can anyone post an example, this has me stumped.

Thanks

Robert Stam

unread,
Apr 15, 2015, 12:38:27 PM4/15/15
to mongod...@googlegroups.com
Reading between the lines of your question, I'm assuming you are using the latest version of the .NET Driver.

FindOneAndUpdateAsync is a specialized form of update that finds a matching document and updates it in one atomic operation.

It is more common to use UpdateAsync to update documents.

FindOneAndUpdateAsync and UpdateAsync are documented here:


There are some examples in the documentation.


--
You received this message because you are subscribed to the Google Groups "mongodb-user"
group.
 
For other MongoDB technical support options, see: http://www.mongodb.org/about/support/.
---
You received this message because you are subscribed to the Google Groups "mongodb-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mongodb-user...@googlegroups.com.
To post to this group, send email to mongod...@googlegroups.com.
Visit this group at http://groups.google.com/group/mongodb-user.
To view this discussion on the web visit https://groups.google.com/d/msgid/mongodb-user/62a97e3b-5fc5-4eb8-8289-d6a8b40a82fa%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages