Click or drag to resize

IMongoIndexManager<TDocument>.CreateMany Method (IEnumerable<CreateIndexModel<TDocument>>, CancellationToken)

Creates multiple indexes.

Namespace:  MongoDB.Driver
Assembly:  MongoDB.Driver (in MongoDB.Driver.dll) Version: 2.20.0+ee01960089f28ea1b501690df5fc9f6318a70242
Syntax
IEnumerable<string> CreateMany(
	IEnumerable<CreateIndexModel<TDocument>> models,
	CancellationToken cancellationToken = null
)

Parameters

models
Type: System.Collections.Generic.IEnumerable<CreateIndexModel<TDocument>>
The models defining each of the indexes.
cancellationToken (Optional)
Type: System.Threading.CancellationToken
The cancellation token.

Return Value

Type: IEnumerable<String>
An IEnumerable<T> of the names of the indexes that were created.
See Also