Table of Contents

Method CreateView

Namespace
MongoDB.Driver
Assembly
MongoDB.Driver.Legacy.dll

CreateView(string, string, IEnumerable<BsonDocument>, IMongoCreateViewOptions)

Creates a view.

public virtual CommandResult CreateView(string viewName, string viewOn, IEnumerable<BsonDocument> pipeline, IMongoCreateViewOptions options)

Parameters

viewName string

The name of the view.

viewOn string

The name of the collection that the view is on.

pipeline IEnumerable<BsonDocument>

The pipeline.

options IMongoCreateViewOptions

The options.

Returns

CommandResult

A CommandResult.