There was a CreateIndexOptions that had a Unique bool property on it, but the overloads of collection.Indexes.CreateOne() that use that are marked as obsolete/deprecating. Now it uses a CreateOneIndexOptions that does not have a property for Unique. Where do I set an index to be unique?
On a separate note, I’m finding this c# driver is hard to follow along with and match to the corresponding Mongodb documentation. It feels like there are conventions or style that are unique to mongodb (and not common to .net) that may be getting followed, but its not mentioned or explained anywhere. It would be a great timesaver if that were part of the “Getting Started”.