Table of Contents

Method SetUnique

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

SetUnique(bool)

Sets whether the index enforces unique values.

public static IndexOptionsBuilder SetUnique(bool value)

Parameters

value bool

Whether the index enforces unique values.

Returns

IndexOptionsBuilder

The builder (so method calls can be chained).