Table of Contents

Class CollectionOptions

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

A builder for the options used when creating a collection.

public static class CollectionOptions
Inheritance
CollectionOptions
Inherited Members

Properties

Null

Gets a null value with a type of IMongoCollectionOptions.

Methods

SetAutoIndexId(bool)

Sets whether to automatically create an index on the _id element.

SetCapped(bool)

Sets whether the collection is capped.

SetCollation(Collation)

Sets the collation.

SetIndexOptionDefaults(IndexOptionDefaults)

Sets the index options defaults.

SetMaxDocuments(long)

Sets the max number of documents in a capped collection.

SetMaxSize(long)

Sets the max size of a capped collection.

SetStorageEngineOptions(BsonDocument)

Sets the storage engine options.

SetValidationAction(DocumentValidationAction)

Sets the validation action.

SetValidationLevel(DocumentValidationLevel)

Sets the validation level.

SetValidator(IMongoQuery)

Sets the validator.