SpatialEdmFunctions.Distance(DbExpression, DbExpression) Methode

Definition

Erstellt eine DbFunctionExpression , die die kanonische "Distance"-Funktion mit den angegebenen Argumenten aufruft, die jeweils einen Ergebnistyp "Edm.Geography" oder "Edm.Geometry" aufweisen müssen. Der Ergebnistyp muss spatialValue1 mit dem Ergebnistyp übereinstimmen.spatialValue2 Der Ergebnistyp des Ausdrucks ist "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

Parameter

spatialValue1
DbExpression

Ein Ausdruck, der den ersten räumlichen Wert angibt.

spatialValue2
DbExpression

Ein Ausdruck, der den räumlichen Wert angibt, von dem der Abstand von spatialValue1 der Entfernung gemessen werden soll.

Gibt zurück

Ein neuer DbFunctionExpression, der den Abstand zwischen den nächstgelegenen Punkten in spatialValue1 und spatialValue1.

Ausnahmen

spatialValue1 spatialValue2

spatialValue1 spatialValue2

Gilt für: