Table of Contents

Method Explain

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

Explain<TSource>(IQueryable<TSource>)

Returns an explanation of how the query was executed (instead of the results).

public static BsonDocument Explain<TSource>(this IQueryable<TSource> source)

Parameters

source IQueryable<TSource>

The LINQ query to explain.

Returns

BsonDocument

An explanation of thow the query was executed.

Type Parameters

TSource

The type of the elements of source.

Explain<TSource>(IQueryable<TSource>, bool)

Returns an explanation of how the query was executed (instead of the results).

public static BsonDocument Explain<TSource>(this IQueryable<TSource> source, bool verbose)

Parameters

source IQueryable<TSource>

The LINQ query to explain

verbose bool

Whether the explanation should contain more details.

Returns

BsonDocument

An explanation of thow the query was executed.

Type Parameters

TSource

The type of the elements of source.