SpatialEdmFunctions.SpatialDifference(DbExpression, DbExpression) 方法

定义

创建 DbFunctionExpression,它使用指定参数(每个参数必须具有一个 Edm.Geography 或 Edm.Geometry 结果类型)调用规范 'SpatialDifference' 函数。Creates a DbFunctionExpression that invokes the canonical 'SpatialDifference' function with the specified arguments, which must each have an Edm.Geography or Edm.Geometry result type. spatialValue1spatialValue2 的结果类型必须相符。The result type of spatialValue1 must match the result type of spatialValue2. 该表达式的结果类型与 spatialValue1spatialValue2 的结果类型相同。The result type of the expression is the same as the type of spatialValue1 and spatialValue2.

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

参数

spatialValue1
DbExpression

一个表达式,指定第一个空间值。An expression that specifies the first spatial value.

spatialValue2
DbExpression

指定应计算与 spatialValue1 的差异的空间值的表达式。An expression that specifies the spatial value for which the difference with spatialValue1 should be computed.

返回

DbFunctionExpression

一个新的 DbFunctionExpression,它返回表示 spatialValue2spatialValue1 之间的差异的几何值。A new DbFunctionExpression that returns the geometry value representing the difference of spatialValue2 with spatialValue1.

例外

spatialValue1 spatialValue2

spatialValue1 spatialValue2

适用于