title: MongoDB: Using $sample with C# driver
body: <p>I'm trying to express the following query using the MongoDB C# driver (2.4.4):</p>
  
  <pre><code>db.media.aggregate({ $sample: { size: 1 }})
  </code></pre>
  
  <p>This what I have so far:</p>
  
  <pre><code>BsonDocument sample = new BsonDocument
  {
      { "$sample", new BsonDocument { { "size", 1 } } }
  };
  MongoBlob mongoBlob = await _collection
      .Aggregate()
      .Group&lt;MongoBlob&gt;(sample)
      .FirstOrDefaultAsync();
  </code></pre>
  
  <p>I cannot put the <code>sample</code> to <code>.Aggregate(AggregateOptions options = null)</code> and putting it into the <code>.Group(...)</code> is obviously wrong. There is also no any like a <code>.Sample()</code> method.</p>
  
  <p>Please, help. Thank you in advance.</p>