title: Select all _id from mongodb collection with c# driver
body: <p>I have large document collection in mongodb and want to get only _id list. Mongodb query is <code>db.getCollection('Documents').find({},{_id : 0, _id: 1})</code>. But in C# query</p>
  
  <pre><code>IMongoCollection&lt;T&gt; Collection { get; set; }
  
  ...
  
  List&lt;BsonDocument&gt; mongoResult = this.Collection.FindAsync(FilterDefinition&lt;T&gt;.Empty, new FindOptions&lt;T, BsonDocument&gt;() { Projection = "{ _id: 0, _id: 1 }" }).Result.ToList();
  </code></pre>
  
  <p>throw exeption <code>InvalidOperationException: Duplicate element name '_id'.</code>
  I want to get <strong><em>only</em></strong> _id list, other fileds not needed. Documents may have different structures and exclude all other fileds manualy difficult.</p>
  
  <p>What C# query corresponds to the specified mongodb query <code>db.getCollection('Documents').find({},{_id : 0, _id: 1}</code>?</p>
  
  <p>UPDATE: Do not offer solutions related query large amounts of data from the server, for example like</p>
  
  <pre><code>this.Collection.Find(d =&gt; true).Project(d =&gt; d.Id).ToListAsync().Result;
  </code></pre>