SpatialEdmFunctions.SpatialContains(DbExpression, DbExpression) 方法

定义

创建 DbFunctionExpression,它使用指定参数(每个参数必须具有 Edm.Geography 或 Edm.Geometry 结果类型)调用规范 'SpatialContains' 函数。Creates a DbFunctionExpression that invokes the canonical 'SpatialContains' function with the specified arguments, which must each have an Edm.Geometry result type. 表达式的结果类型为 Edm.Boolean。The result type of the expression is Edm.Boolean.

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

参数

geometryValue1
DbExpression

一个表达式,指定第一个几何值。An expression that specifies the first geometry value.

geometryValue2
DbExpression

指定应与 geometryValue1 进行比较的几何值的表达式。An expression that specifies the geometry value that should be compared with geometryValue1.

返回

DbFunctionExpression

一个新的 DbFunctionExpression,它返回指示 geometryValue1 是否在空间上包含 geometryValue2 的布尔值。A new DbFunctionExpression that returns a Boolean value indicating whether geometryValue1 spatially contains geometryValue2.

例外

geometryValue1 geometryValue2

geometryValue1 geometryValue2

适用于