title: Inserting Documents into MongoDB and ignore the duplicate documents
body: <p>I am trying to insert documents into MongoDB but I want to have only unique documents and whenever encounter a duplicate document, just ignore it if it is already exists and go to the next one. I am using the following code but apparently it does not work.</p>
  
  <pre><code>var keys = IndexKeys.Ascending("TrackingNumber");
  var options = IndexOptions.SetUnique(true).SetDropDups(true);
  _collection.CreateIndex(keys, options);`
  </code></pre>