Table of Contents

Method Geo2DSphere

Namespace
MongoDB.Driver
Assembly
MongoDB.Driver.dll

Geo2DSphere<TDocument>(IndexKeysDefinition<TDocument>, FieldDefinition<TDocument>)

Combines an existing index keys definition with a 2dsphere index key definition.

public static IndexKeysDefinition<TDocument> Geo2DSphere<TDocument>(this IndexKeysDefinition<TDocument> keys, FieldDefinition<TDocument> field)

Parameters

keys IndexKeysDefinition<TDocument>

The keys.

field FieldDefinition<TDocument>

The field.

Returns

IndexKeysDefinition<TDocument>

A combined index keys definition.

Type Parameters

TDocument

The type of the document.

Geo2DSphere<TDocument>(IndexKeysDefinition<TDocument>, Expression<Func<TDocument, object>>)

Combines an existing index keys definition with a 2dsphere index key definition.

public static IndexKeysDefinition<TDocument> Geo2DSphere<TDocument>(this IndexKeysDefinition<TDocument> keys, Expression<Func<TDocument, object>> field)

Parameters

keys IndexKeysDefinition<TDocument>

The keys.

field Expression<Func<TDocument, object>>

The field.

Returns

IndexKeysDefinition<TDocument>

A combined index keys definition.

Type Parameters

TDocument

The type of the document.