SpatialEdmFunctions.Distance(DbExpression, DbExpression) Méthode

Définition

Crée une DbFunctionExpression appelant la fonction « Distance » canonique avec les arguments spécifiés, qui doivent chacun avoir un résultat de type Edm.Geography ou Edm.Geometry. Le type de résultat de spatialValue1 doit correspondre au type de résultat de spatialValue2. Le résultat de l’expression est de type 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

Paramètres

spatialValue1
DbExpression

Expression qui spécifie la première valeur spatiale.

spatialValue2
DbExpression

Expression qui spécifie la valeur spatiale à partir de laquelle la distance depuis spatialValue1 doit être mesurée.

Retours

Nouvelle DbFunctionExpression qui retourne la distance entre les points les plus proches de spatialValue1 et de spatialValue1.

Exceptions

spatialValue1 spatialValue2

spatialValue1 spatialValue2

S’applique à