Method WithinCircle
WithinCircle<TMember>(Expression<Func<TDocument, TMember>>, double, double, double)
Tests that the value of the named element is within a circle (see $within and $center).
public static IMongoQuery WithinCircle<TMember>(Expression<Func<TDocument, TMember>> memberExpression, double centerX, double centerY, double radius)
Parameters
memberExpressionExpression<Func<TDocument, TMember>>The member expression representing the element to test.
centerXdoubleThe x coordinate of the origin.
centerYdoubleThe y coordinate of the origin.
radiusdoubleThe radius of the circle.
Returns
- IMongoQuery
An IMongoQuery.
Type Parameters
TMemberThe member type.
WithinCircle<TMember>(Expression<Func<TDocument, TMember>>, double, double, double, bool)
Tests that the value of the named element is within a circle (see $within and $center).
public static IMongoQuery WithinCircle<TMember>(Expression<Func<TDocument, TMember>> memberExpression, double centerX, double centerY, double radius, bool spherical)
Parameters
memberExpressionExpression<Func<TDocument, TMember>>The member expression representing the element to test.
centerXdoubleThe x coordinate of the origin.
centerYdoubleThe y coordinate of the origin.
radiusdoubleThe radius of the circle.
sphericalboolif set to
true[spherical].
Returns
- IMongoQuery
An IMongoQuery.
Type Parameters
TMemberThe member type.