title: How to simply perform a update/replace many documents operation in MongoDb
body: <p>This is perhaps one of the most common and basic database operations you can perform. However, how you perform this operation in MongoDb, is elusive.</p>
  
  <p>There's a <code>UpdateManyAsync</code> method in the C# driver. But all I can find for it is examples like;</p>
  
  <p>The following operation updates all documents where violations are greater than 4 and $set a flag for review:</p>
  
  <pre><code>try {
     db.restaurant.updateMany(
        { violations: { $gt: 4 } },
        { $set: { "Review" : true } }
     );
  } catch (e) {
     print(e);
  }
  </code></pre>
  
  <p>Frankly I don't know how you guys build your applications but our organization will never embed domain logic like how many violations constitutes a review in our database querying logic. Like all the examples I can find for this operation do.</p>
  
  <p>It seems at best that our option is to use some sort of bulk api for this, which seems unnecessary for such a simple operation. Making the bulk api perform a thousand separate replaces seems ineffective to me, but I might be wrong here?</p>
  
  <p>In other storage technologies and more mature API's all the code necessary to perform this operation is (example Entity framework);</p>
  
  <pre><code>db.UpdateRange(stocks);
  await db.SaveChangesAsync();
  </code></pre>
  
  <p>Is this tracked as a feature request for the Mongo project somewhere?</p>