Method GeoNearAs
GeoNearAs<TDocument>(GeoNearArgs)
Runs a GeoNear command on this collection.
public virtual GeoNearResult<TDocument> GeoNearAs<TDocument>(GeoNearArgs args)
Parameters
args
GeoNearArgsThe args.
Returns
- GeoNearResult<TDocument>
Type Parameters
TDocument
The 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
query
IMongoQueryThe query (usually a QueryDocument or constructed using the Query builder).
x
doubleThe x coordinate of the starting location.
y
doubleThe y coordinate of the starting location.
limit
intThe maximum number of results returned.
Returns
- GeoNearResult<TDocument>
Type Parameters
TDocument
The 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
query
IMongoQueryThe query (usually a QueryDocument or constructed using the Query builder).
x
doubleThe x coordinate of the starting location.
y
doubleThe y coordinate of the starting location.
limit
intThe maximum number of results returned.
options
IMongoGeoNearOptionsThe GeoNear command options (usually a GeoNearOptionsDocument or constructed using the GeoNearOptions builder).
Returns
- GeoNearResult<TDocument>
Type Parameters
TDocument
The 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
documentType
TypeThe type to deserialize the documents as.
args
GeoNearArgsThe 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
documentType
TypeThe type to deserialize the documents as.
query
IMongoQueryThe query (usually a QueryDocument or constructed using the Query builder).
x
doubleThe x coordinate of the starting location.
y
doubleThe y coordinate of the starting location.
limit
intThe 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
documentType
TypeThe type to deserialize the documents as.
query
IMongoQueryThe query (usually a QueryDocument or constructed using the Query builder).
x
doubleThe x coordinate of the starting location.
y
doubleThe y coordinate of the starting location.
limit
intThe maximum number of results returned.
options
IMongoGeoNearOptionsThe GeoNear command options (usually a GeoNearOptionsDocument or constructed using the GeoNearOptions builder).