Share via


SpatialEdmFunctions.Distance(DbExpression, DbExpression) Metodo

Definizione

Crea un oggetto DbFunctionExpression che richiama la funzione 'Distance' canonica con l'argomento specificato, che deve presentare un tipo di risultato Edm.Geography o Edm.Geometry. Il tipo di risultato di spatialValue1 deve corrispondere al tipo di risultato di spatialValue2. Il tipo di risultato dell'espressione è 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

Parametri

spatialValue1
DbExpression

Espressione che specifica il primo valore spaziale.

spatialValue2
DbExpression

Espressione che specifica il valore spaziale da cui misurare la distanza da spatialValue1.

Restituisce

Nuovo DbFunctionExpression che restituisce la distanza tra i punti più vicini in spatialValue1 e spatialValue1.

Eccezioni

spatialValue1 spatialValue2

spatialValue1 spatialValue2

Si applica a