I have to update all the fields except _id.
I want to avoid to manually update the 16 fields…
All the new fields are stored inside a BsonDocument
Thanks for ideas
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
As @Philipp hinted there is a way way to do this. You can actually use the
savefunction ( http://www.mongodb.org/display/DOCS/CSharp+Driver+Tutorial#CSharpDriverTutorial-Save%3CTDocument%3Emethod ) which will do what he says for you in the database end.So imagine you have a document of:
And that
_idalready exists, it will replace the previous document with this one.Neat huh?