Click or drag to resize

MongoIndexManagerBaseTDocumentCreateMany Method (IClientSessionHandle, IEnumerableCreateIndexModelTDocument, CreateManyIndexesOptions, CancellationToken)

Creates multiple indexes.

Namespace:  MongoDB.Driver
Assembly:  MongoDB.Driver (in MongoDB.Driver.dll) Version: 2.13.1-v2-13-x1+a7f8afe27855f38f4f72157d11ba2ae73895502e
Syntax
public virtual IEnumerable<string> CreateMany(
	IClientSessionHandle session,
	IEnumerable<CreateIndexModel<TDocument>> models,
	CreateManyIndexesOptions options,
	CancellationToken cancellationToken = null
)

Parameters

session
Type: MongoDB.DriverIClientSessionHandle
The session.
models
Type: System.Collections.GenericIEnumerableCreateIndexModelTDocument
The models defining each of the indexes.
options
Type: MongoDB.DriverCreateManyIndexesOptions
The options for create multiple indexes.
cancellationToken (Optional)
Type: System.ThreadingCancellationToken
The cancellation token.

Return Value

Type: IEnumerableString
An IEnumerableT of the names of the indexes that were created.

Implements

IMongoIndexManagerTDocumentCreateMany(IClientSessionHandle, IEnumerableCreateIndexModelTDocument, CreateManyIndexesOptions, CancellationToken)
See Also