Method CreateViewAsync
CreateViewAsync<TDocument, TResult>(string, string, PipelineDefinition<TDocument, TResult>, CreateViewOptions<TDocument>, CancellationToken)
Creates a view.
public virtual Task CreateViewAsync<TDocument, TResult>(string viewName, string viewOn, PipelineDefinition<TDocument, TResult> pipeline, CreateViewOptions<TDocument> options = null, CancellationToken cancellationToken = default)
Parameters
viewName
stringThe name of the view.
viewOn
stringThe name of the collection that the view is on.
pipeline
PipelineDefinition<TDocument, TResult>The pipeline.
options
CreateViewOptions<TDocument>The options.
cancellationToken
CancellationTokenThe cancellation token.
Returns
- Task
A task.
Type Parameters
TDocument
The type of the input documents.
TResult
The type of the pipeline result documents.
CreateViewAsync<TDocument, TResult>(IClientSessionHandle, string, string, PipelineDefinition<TDocument, TResult>, CreateViewOptions<TDocument>, CancellationToken)
Creates a view.
public virtual Task CreateViewAsync<TDocument, TResult>(IClientSessionHandle session, string viewName, string viewOn, PipelineDefinition<TDocument, TResult> pipeline, CreateViewOptions<TDocument> options = null, CancellationToken cancellationToken = default)
Parameters
session
IClientSessionHandleThe session.
viewName
stringThe name of the view.
viewOn
stringThe name of the collection that the view is on.
pipeline
PipelineDefinition<TDocument, TResult>The pipeline.
options
CreateViewOptions<TDocument>The options.
cancellationToken
CancellationTokenThe cancellation token.
Returns
- Task
A task.
Type Parameters
TDocument
The type of the input documents.
TResult
The type of the pipeline result documents.