Method CreateManyAsync
CreateManyAsync(IEnumerable<CreateIndexModel<TDocument>>, CancellationToken)
Creates multiple indexes.
Task<IEnumerable<string>> CreateManyAsync(IEnumerable<CreateIndexModel<TDocument>> models, CancellationToken cancellationToken = default)
Parameters
models
IEnumerable<CreateIndexModel<TDocument>>The models defining each of the indexes.
cancellationToken
CancellationTokenThe cancellation token.
Returns
- Task<IEnumerable<string>>
A task whose result is an IEnumerable<T> of the names of the indexes that were created.
CreateManyAsync(IEnumerable<CreateIndexModel<TDocument>>, CreateManyIndexesOptions, CancellationToken)
Creates multiple indexes.
Task<IEnumerable<string>> CreateManyAsync(IEnumerable<CreateIndexModel<TDocument>> models, CreateManyIndexesOptions options, CancellationToken cancellationToken = default)
Parameters
models
IEnumerable<CreateIndexModel<TDocument>>The models defining each of the indexes.
options
CreateManyIndexesOptionsThe options for create multiple indexes.
cancellationToken
CancellationTokenThe cancellation token.
Returns
- Task<IEnumerable<string>>
A task whose result is an IEnumerable<T> of the names of the indexes that were created.
CreateManyAsync(IClientSessionHandle, IEnumerable<CreateIndexModel<TDocument>>, CancellationToken)
Creates multiple indexes.
Task<IEnumerable<string>> CreateManyAsync(IClientSessionHandle session, IEnumerable<CreateIndexModel<TDocument>> models, CancellationToken cancellationToken = default)
Parameters
session
IClientSessionHandleThe session.
models
IEnumerable<CreateIndexModel<TDocument>>The models defining each of the indexes.
cancellationToken
CancellationTokenThe cancellation token.
Returns
- Task<IEnumerable<string>>
A task whose result is an IEnumerable<T> of the names of the indexes that were created.
CreateManyAsync(IClientSessionHandle, IEnumerable<CreateIndexModel<TDocument>>, CreateManyIndexesOptions, CancellationToken)
Creates multiple indexes.
Task<IEnumerable<string>> CreateManyAsync(IClientSessionHandle session, IEnumerable<CreateIndexModel<TDocument>> models, CreateManyIndexesOptions options, CancellationToken cancellationToken = default)
Parameters
session
IClientSessionHandleThe session.
models
IEnumerable<CreateIndexModel<TDocument>>The models defining each of the indexes.
options
CreateManyIndexesOptionsThe options for create multiple indexes.
cancellationToken
CancellationTokenThe cancellation token.
Returns
- Task<IEnumerable<string>>
A task whose result is an IEnumerable<T> of the names of the indexes that were created.