Method CreateCollectionAsync
CreateCollectionAsync(string, CreateCollectionOptions, CancellationToken)
Creates the collection with the specified name.
public abstract Task CreateCollectionAsync(string name, CreateCollectionOptions options = null, CancellationToken cancellationToken = default)
Parameters
name
stringThe name.
options
CreateCollectionOptionsThe options.
cancellationToken
CancellationTokenThe cancellation token.
Returns
- Task
A task.
CreateCollectionAsync(IClientSessionHandle, string, CreateCollectionOptions, CancellationToken)
Creates the collection with the specified name.
public virtual Task CreateCollectionAsync(IClientSessionHandle session, string name, CreateCollectionOptions options = null, CancellationToken cancellationToken = default)
Parameters
session
IClientSessionHandleThe session.
name
stringThe name.
options
CreateCollectionOptionsThe options.
cancellationToken
CancellationTokenThe cancellation token.
Returns
- Task
A task.