Take a look
MongoDB.Driver.Builders.Update.Rename(string oldElementName, string newElementName)
It returns an IUpdateQuery, which you can pass to collection.Update () and rename your field. The C # Update constructor has every special command that you can use in mongo as a function call to create a request.
The Builders namespace is a great namespace in the C # MongoDB driver. It includes query and update collectors. You can hook on teams and do things like this:
Update.Set("indexsize", indexSize).Set("extractsize", extractedFileSize);
or
Query.GT("filesize", 200000).In(bsonArray);
source share