title: MongoDB C# - update using custom strongly-typed objects not allowed?
body: <p>I am trying to perform an update using strongly-typed objects. For example, </p>
  
  <pre><code>public void setAppointmentPrefs(string UserName, IEnumerable&lt;AppointmentInfo&gt; info)
  {
      var query = new QueryDocument {{ "ProviderId", UserName}};
      var update = Update.Set("Prefs",prefs);    // prefs.toList() gives same error
      // providerprefs initialized in constructor
      providerprefs.Update(query, update);
  }
  </code></pre>
  
  <p>I receive a compiler error saying:<code>Error    14  The best overloaded method match for 'MongoDB.Driver.Builders.Update.Set(string, MongoDB.Bson.BsonValue)' has some invalid arguments</code>   </p>
  
  <p>Obviously the Mongo driver will not let me update based on my own object (whether as IEnumerable or prefs.toList()), which seems a contrast from the way it permits me to insert or query with custom objects. Surely I am missing something obvious that would permit me to avoid deserializing, weakly typing then creating a generic BsonDocument!! TIA. </p>