If I have a Company collection which contains embedded Divisions:
{
\"_id\": 1
\"_t\": \"Company\",
\"Name\": \"Test Company\"
\"Divisions\": [
You could use the positional array modification feature of MongoDB to update an entire division in the array at once as follows:
var division = GetDivisionById(1);
division.Name = "New Name";
// change any other properties of division you want
collection.Update(
Query.EQ("Divisions._id", 1),
Update.Set("Divisions.$", BsonDocumentWrapper.Create<IDivision>(division))
);
The key things going on here are: