Method Near
Near<TMember, TCoordinates>(Expression<Func<TDocument, TMember>>, GeoJsonPoint<TCoordinates>)
Tests that the value of the named element is near a point (see $near).
public IMongoQuery Near<TMember, TCoordinates>(Expression<Func<TDocument, TMember>> memberExpression, GeoJsonPoint<TCoordinates> point) where TCoordinates : GeoJsonCoordinates
Parameters
memberExpression
Expression<Func<TDocument, TMember>>The member expression.
point
GeoJsonPoint<TCoordinates>The point.
Returns
- IMongoQuery
An IMongoQuery.
Type Parameters
TMember
The type of the member.
TCoordinates
The type of the coordinates.
Near<TMember, TCoordinates>(Expression<Func<TDocument, TMember>>, GeoJsonPoint<TCoordinates>, double)
Tests that the value of the named element is near some location (see $near).
public IMongoQuery Near<TMember, TCoordinates>(Expression<Func<TDocument, TMember>> memberExpression, GeoJsonPoint<TCoordinates> point, double maxDistance) where TCoordinates : GeoJsonCoordinates
Parameters
memberExpression
Expression<Func<TDocument, TMember>>The member expression.
point
GeoJsonPoint<TCoordinates>The point.
maxDistance
doubleThe max distance.
Returns
- IMongoQuery
An IMongoQuery.
Type Parameters
TMember
The member type.
TCoordinates
The type of the coordinates.
Near<TMember, TCoordinates>(Expression<Func<TDocument, TMember>>, GeoJsonPoint<TCoordinates>, double, bool)
Tests that the value of the named element is near some location (see $near).
public IMongoQuery Near<TMember, TCoordinates>(Expression<Func<TDocument, TMember>> memberExpression, GeoJsonPoint<TCoordinates> point, double maxDistance, bool spherical) where TCoordinates : GeoJsonCoordinates
Parameters
memberExpression
Expression<Func<TDocument, TMember>>The member expression.
point
GeoJsonPoint<TCoordinates>The point.
maxDistance
doubleThe max distance.
spherical
boolif set to
true
then the query will be translated to $nearSphere.
Returns
- IMongoQuery
An IMongoQuery.
Type Parameters
TMember
The member type.
TCoordinates
The type of the coordinates.
Near<TMember>(Expression<Func<TDocument, TMember>>, double, double)
Tests that the value of the named element is near some location (see $near).
public IMongoQuery Near<TMember>(Expression<Func<TDocument, TMember>> memberExpression, double x, double y)
Parameters
memberExpression
Expression<Func<TDocument, TMember>>The member expression representing the element to test.
x
doubleThe x value of the origin.
y
doubleThe y value of the origin.
Returns
- IMongoQuery
An IMongoQuery.
Type Parameters
TMember
The member type.
Near<TMember>(Expression<Func<TDocument, TMember>>, double, double, double)
Tests that the value of the named element is near some location (see $near).
public IMongoQuery Near<TMember>(Expression<Func<TDocument, TMember>> memberExpression, double x, double y, double maxDistance)
Parameters
memberExpression
Expression<Func<TDocument, TMember>>The member expression representing the element to test.
x
doubleThe x value of the origin.
y
doubleThe y value of the origin.
maxDistance
doubleThe max distance.
Returns
- IMongoQuery
An IMongoQuery.
Type Parameters
TMember
The member type.
Near<TMember>(Expression<Func<TDocument, TMember>>, double, double, double, bool)
Tests that the value of the named element is near some location (see $near).
public IMongoQuery Near<TMember>(Expression<Func<TDocument, TMember>> memberExpression, double x, double y, double maxDistance, bool spherical)
Parameters
memberExpression
Expression<Func<TDocument, TMember>>The member expression representing the element to test.
x
doubleThe x value of the origin.
y
doubleThe y value of the origin.
maxDistance
doubleThe max distance.
spherical
boolif set to
true
[spherical].
Returns
- IMongoQuery
An IMongoQuery.
Type Parameters
TMember
The member type.