使用访求如下
[C#] 纯文本查看 复制代码 //
// 摘要:
// Tests that the value of the named element is near some location (see $near).
//
// 参数:
// name:
// The name of the element to test.
//
// x:
// The x value of the origin.
//
// y:
// The y value of the origin.
//
// 返回结果:
// An IMongoQuery.
public static IMongoQuery Near(string name, double x, double y);
//
// 摘要:
// Tests that the value of the named element is near some location (see $near).
//
// 参数:
// name:
// The name of the element to test.
//
// point:
// The point.
//
// maxDistance:
// The max distance.
//
// 返回结果:
// An IMongoQuery.
public static IMongoQuery Near<TCoordinates>(string name, GeoJsonPoint<TCoordinates> point, double maxDistance) where TCoordinates : GeoJsonCoordinates;
//
// 摘要:
// Tests that the value of the named element is near some location (see $near).
//
// 参数:
// name:
// The name of the element to test.
//
// x:
// The x value of the origin.
//
// y:
// The y value of the origin.
//
// maxDistance:
// The max distance.
//
// 返回结果:
// An IMongoQuery.
public static IMongoQuery Near(string name, double x, double y, double maxDistance);
//
// 摘要:
// Tests that the value of the named element is near some location (see $near).
//
// 参数:
// name:
// The name of the element to test.
//
// point:
// The point.
//
// maxDistance:
// The max distance.
//
// spherical:
// if set to true then the query will be translated to $nearSphere.
//
// 返回结果:
// An IMongoQuery.
public static IMongoQuery Near<TCoordinates>(string name, GeoJsonPoint<TCoordinates> point, double maxDistance, bool spherical) where TCoordinates : GeoJsonCoordinates;
//
// 摘要:
// Tests that the value of the named element is near some location (see $near).
//
// 参数:
// name:
// The name of the element to test.
//
// x:
// The x value of the origin.
//
// y:
// The y value of the origin.
//
// maxDistance:
// The max distance.
//
// spherical:
// if set to true then the query will be translated to $nearSphere.
//
// 返回结果:
// An IMongoQuery.
public static IMongoQuery Near(string name, double x, double y, double maxDistance, bool spherical);
上面是方法签名,大家只要输入相应的参数就行了
|