Table of Contents

Method GeoWithin

Namespace
MongoDB.Driver
Assembly
MongoDB.Driver.dll

GeoWithin<TCoordinates>(FieldDefinition<TDocument>, GeoJsonGeometry<TCoordinates>)

Creates a geo within filter.

public FilterDefinition<TDocument> GeoWithin<TCoordinates>(FieldDefinition<TDocument> field, GeoJsonGeometry<TCoordinates> geometry) where TCoordinates : GeoJsonCoordinates

Parameters

field FieldDefinition<TDocument>

The field.

geometry GeoJsonGeometry<TCoordinates>

The geometry.

Returns

FilterDefinition<TDocument>

A geo within filter.

Type Parameters

TCoordinates

The type of the coordinates.

GeoWithin<TCoordinates>(Expression<Func<TDocument, object>>, GeoJsonGeometry<TCoordinates>)

Creates a geo within filter.

public FilterDefinition<TDocument> GeoWithin<TCoordinates>(Expression<Func<TDocument, object>> field, GeoJsonGeometry<TCoordinates> geometry) where TCoordinates : GeoJsonCoordinates

Parameters

field Expression<Func<TDocument, object>>

The field.

geometry GeoJsonGeometry<TCoordinates>

The geometry.

Returns

FilterDefinition<TDocument>

A geo within filter.

Type Parameters

TCoordinates

The type of the coordinates.