title: c# mongodb BsonDocument array
body: <p>the below code seems to work except that the values are not actually saved to the existing document.</p>
  
  <pre><code>    MongoServer mongo = MongoServer.Create();
      mongo.Connect();
      var db = mongo.GetDatabase("forms"); 
      mongo.RequestStart(db);
      var collection = db.GetCollection("forms");
      var query = new QueryDocument("_id",ObjectId.Parse(Id));
      var resultsCursor = collection.Find(query);
  
      foreach (BsonDocument item in resultsCursor)
      {   
      var formFields = new BsonArray();
      formFields.Add(new BsonDocument
      {
          {"ID", ObjectId.GenerateNewId()},
          {"NAME",name},
          {"TYPE",type}
      }
      );
      collection.Save(item.Add("fields",formFields));
  </code></pre>
  
  <p>I say it works because this the result of getlasterror run immediately after the save:</p>
  
  <pre><code>db.GetLastError()
  {MongoDB.Driver.GetLastErrorResult}
  base {MongoDB.Driver.CommandResult}: {MongoDB.Driver.GetLastErrorResult}
  DocumentsAffected: 1
  HasLastErrorMessage: false
  LastErrorMessage: null
  UpdatedExisting: true
  </code></pre>
  
  <p>I'm missing something (probably something simple...).
  Thanks for any assistance.</p>