Mongodb C# bulk update/replace on subcollection
<p>The following object structure is given:</p>

<pre><code>public class RootDocument
{
    public Guid Id { get; set; }
    public string SomeProperty { get; set; }
    public List&lt;ChildDocument&gt; Documents { get; set; }
}

public class ChildDocument
{
    public Guid Id { get; set; }
    public string Name { get; set; }
    public string SomeProperty { get; set; }
}
</code></pre>

<p>I want to update all <code>ChildDocuments</code> of a specified <code>Id</code> on all <code>RootDocument</code> in a <code>RootDocument</code> collection.</p>

<p>The idea is to update them all in a bulk operation like this:</p>

<pre><code>var document = new ChildDocument() { Id = &lt;id of existing ChildDocument&gt;, Name = ..., ...);

var bulkOperations = new WriteModel&lt;RootDocument&gt;[]
{
    new UpdateManyModel&lt;RootDocument&gt;(
        Builders&lt;RootDocument&gt;.Filter.Eq("Documents.Id", document.id),
        Builders&lt;RootDocument&gt;.Update.AddToSet(x =&gt; x.Documents, document))
};

await mongoDatabase.GetCollection&lt;RootDocument&gt;()
    .BulkWriteAsync(bulkOperations, new BulkWriteOptions { IsOrdered = false });
</code></pre>

<p>But <code>AddToSet</code> is not a replace operation of the existing <code>ChildDocument</code>.</p>

<p>What is the best way with the latest MongoDB C# driver to implement this requirement?</p>