Sdílet prostřednictvím


SpatialEdmFunctions.Distance(DbExpression, DbExpression) Metoda

Definice

Vytvoří funkci DbFunctionExpression , která vyvolá kanonickou funkci Vzdálenost se zadanými argumenty, z nichž každý musí mít typ výsledku Edm.Geography nebo Edm.Geometry. Typ výsledku spatialValue1 musí odpovídat typu výsledku spatialValue2. Typ výsledku výrazu je 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

Parametry

spatialValue1
DbExpression

Výraz, který určuje první prostorovou hodnotu.

spatialValue2
DbExpression

Výraz, který určuje prostorovou hodnotu, od které se má měřit vzdálenost od spatialValue1 .

Návraty

Nový DbFunctionExpression, který vrací vzdálenost mezi nejbližšími body v spatialValue1 a spatialValue1.

Výjimky

spatialValue1 spatialValue2

spatialValue1 spatialValue2

Platí pro