Table of Contents

Method SetUnique

Namespace
MongoDB.Driver.Builders
Assembly
MongoDB.Driver.Legacy.dll

SetUnique(bool)

Sets whether the index enforces unique values.

public IndexOptionsBuilder<TDocument> SetUnique(bool value)

Parameters

value bool

Whether the index enforces unique values.

Returns

IndexOptionsBuilder<TDocument>

The builder (so method calls can be chained).