SpatialEdmFunctions.Distance(DbExpression, DbExpression) Methode

Definitie

Hiermee maakt u een DbFunctionExpression functie die de canonieke functie 'Afstand' aanroept met de opgegeven argumenten, die elk een resultaattype Edm.Geography of Edm.Geometry moeten hebben. Het resultaattype spatialValue1 moet overeenkomen met het resultaattype van spatialValue2. Het resultaattype van de expressie is Edm.Double.

public:
[System::Runtime::CompilerServices::Extension]
 static System::Data::Common::CommandTrees::DbFunctionExpression ^ Distance(System::Data::Common::CommandTrees::DbExpression ^ spatialValue1, System::Data::Common::CommandTrees::DbExpression ^ spatialValue2);
public static System.Data.Common.CommandTrees.DbFunctionExpression Distance(this System.Data.Common.CommandTrees.DbExpression spatialValue1, System.Data.Common.CommandTrees.DbExpression spatialValue2);
static member Distance : System.Data.Common.CommandTrees.DbExpression * System.Data.Common.CommandTrees.DbExpression -> System.Data.Common.CommandTrees.DbFunctionExpression
<Extension()>
Public Function Distance (spatialValue1 As DbExpression, spatialValue2 As DbExpression) As DbFunctionExpression

Parameters

spatialValue1
DbExpression

Een expressie die de eerste ruimtelijke waarde aangeeft.

spatialValue2
DbExpression

Een expressie waarmee de ruimtelijke waarde wordt opgegeven waaruit de afstand moet spatialValue1 worden gemeten.

Retouren

Een nieuwe DbFunctionExpression die de afstand tussen de dichtstbijzijnde punten in spatialValue1 en spatialValue1retourneert.

Uitzonderingen

spatialValue1 spatialValue2

spatialValue1 spatialValue2

Van toepassing op