Click or drag to resize

IMongoDatabaseCreateViewTDocument, TResult Method (IClientSessionHandle, String, String, PipelineDefinitionTDocument, TResult, CreateViewOptionsTDocument, CancellationToken)

Creates a view.

Namespace:  MongoDB.Driver
Assembly:  MongoDB.Driver (in MongoDB.Driver.dll) Version: 2.10.0+569905ff5e778c38ea19d9d0392496a83e1704ed
Syntax
void CreateView<TDocument, TResult>(
	IClientSessionHandle session,
	string viewName,
	string viewOn,
	PipelineDefinition<TDocument, TResult> pipeline,
	CreateViewOptions<TDocument> options = null,
	CancellationToken cancellationToken = null
)

Parameters

session
Type: MongoDB.DriverIClientSessionHandle
The session.
viewName
Type: SystemString
The name of the view.
viewOn
Type: SystemString
The name of the collection that the view is on.
pipeline
Type: MongoDB.DriverPipelineDefinitionTDocument, TResult
The pipeline.
options (Optional)
Type: MongoDB.DriverCreateViewOptionsTDocument
The options.
cancellationToken (Optional)
Type: System.ThreadingCancellationToken
The cancellation token.

Type Parameters

TDocument
The type of the input documents.
TResult
The type of the pipeline result documents.
See Also