Method GeoNearAs
GeoNearAs<TDocument>(GeoNearArgs)
Runs a GeoNear command on this collection.
public virtual GeoNearResult<TDocument> GeoNearAs<TDocument>(GeoNearArgs args)
Parameters
argsGeoNearArgsThe args.
Returns
- GeoNearResult<TDocument>
Type Parameters
TDocumentThe type to deserialize the documents as.
GeoNearAs<TDocument>(IMongoQuery, double, double, int)
Runs a GeoNear command on this collection.
[Obsolete("Use the overload of GeoNearAs that has a GeoNearArgs parameter instead.")]
public virtual GeoNearResult<TDocument> GeoNearAs<TDocument>(IMongoQuery query, double x, double y, int limit)
Parameters
queryIMongoQueryThe query (usually a QueryDocument or constructed using the Query builder).
xdoubleThe x coordinate of the starting location.
ydoubleThe y coordinate of the starting location.
limitintThe maximum number of results returned.
Returns
- GeoNearResult<TDocument>
Type Parameters
TDocumentThe type to deserialize the documents as.
GeoNearAs<TDocument>(IMongoQuery, double, double, int, IMongoGeoNearOptions)
Runs a GeoNear command on this collection.
[Obsolete("Use the overload of GeoNearAs that has a GeoNearArgs parameter instead.")]
public virtual GeoNearResult<TDocument> GeoNearAs<TDocument>(IMongoQuery query, double x, double y, int limit, IMongoGeoNearOptions options)
Parameters
queryIMongoQueryThe query (usually a QueryDocument or constructed using the Query builder).
xdoubleThe x coordinate of the starting location.
ydoubleThe y coordinate of the starting location.
limitintThe maximum number of results returned.
optionsIMongoGeoNearOptionsThe GeoNear command options (usually a GeoNearOptionsDocument or constructed using the GeoNearOptions builder).
Returns
- GeoNearResult<TDocument>
Type Parameters
TDocumentThe type to deserialize the documents as.
GeoNearAs(Type, GeoNearArgs)
Runs a GeoNear command on this collection.
public virtual GeoNearResult GeoNearAs(Type documentType, GeoNearArgs args)
Parameters
documentTypeTypeThe type to deserialize the documents as.
argsGeoNearArgsThe args.
Returns
GeoNearAs(Type, IMongoQuery, double, double, int)
Runs a GeoNear command on this collection.
[Obsolete("Use the overload of GeoNearAs that has a GeoNearArgs parameter instead.")]
public virtual GeoNearResult GeoNearAs(Type documentType, IMongoQuery query, double x, double y, int limit)
Parameters
documentTypeTypeThe type to deserialize the documents as.
queryIMongoQueryThe query (usually a QueryDocument or constructed using the Query builder).
xdoubleThe x coordinate of the starting location.
ydoubleThe y coordinate of the starting location.
limitintThe maximum number of results returned.
Returns
GeoNearAs(Type, IMongoQuery, double, double, int, IMongoGeoNearOptions)
Runs a GeoNear command on this collection.
[Obsolete("Use the overload of GeoNearAs that has a GeoNearArgs parameter instead.")]
public virtual GeoNearResult GeoNearAs(Type documentType, IMongoQuery query, double x, double y, int limit, IMongoGeoNearOptions options)
Parameters
documentTypeTypeThe type to deserialize the documents as.
queryIMongoQueryThe query (usually a QueryDocument or constructed using the Query builder).
xdoubleThe x coordinate of the starting location.
ydoubleThe y coordinate of the starting location.
limitintThe maximum number of results returned.
optionsIMongoGeoNearOptionsThe GeoNear command options (usually a GeoNearOptionsDocument or constructed using the GeoNearOptions builder).