SqlSpatialFunctions.InstanceOf Method

 

Tests if the SqlGeography instance is the same as the specified type.

Namespace:   System.Data.Entity.SqlServer
Assembly:  EntityFramework.SqlServer (in EntityFramework.SqlServer.dll)

NameDescription
System_CAPS_pubmethodSystem_CAPS_staticInstanceOf(DbGeography, String)

Tests if the SqlGeography instance is the same as the specified type.

System_CAPS_pubmethodSystem_CAPS_staticInstanceOf(DbGeometry, String)

Tests if the SqlGeometry instance is the same as the specified type.


SqlSpatialFunctions.InstanceOf Method (DbGeography, String)

Tests if the SqlGeography instance is the same as the specified type.

[SuppressMessageAttribute("Microsoft.Usage", "CA1801:ReviewUnusedParameters", 
	MessageId = "geometryTypeName")]
[SuppressMessageAttribute("Microsoft.Usage", "CA1801:ReviewUnusedParameters", 
	MessageId = "geographyValue")]
[DbFunctionAttribute("SqlServer", "INSTANCEOF")]
public static Nullable<bool> InstanceOf(
	DbGeography geographyValue,
	string geometryTypeName
)

Parameters

geographyValue
Type: System.Data.Entity.Spatial.DbGeography

The geography value.

geometryTypeName
Type: System.String

A string that specifies one of the 12 types exposed in the geography type hierarchy.

Return Value

Type: System.Nullable<Boolean>

A string that specifies one of the 12 types exposed in the geography type hierarchy.


SqlSpatialFunctions.InstanceOf Method (DbGeometry, String)

Tests if the SqlGeometry instance is the same as the specified type.

[SuppressMessageAttribute("Microsoft.Usage", "CA1801:ReviewUnusedParameters", 
	MessageId = "geometryValue")]
[SuppressMessageAttribute("Microsoft.Usage", "CA1801:ReviewUnusedParameters", 
	MessageId = "geometryTypeName")]
[DbFunctionAttribute("SqlServer", "INSTANCEOF")]
public static Nullable<bool> InstanceOf(
	DbGeometry geometryValue,
	string geometryTypeName
)

Parameters

geometryValue
Type: System.Data.Entity.Spatial.DbGeometry

The geometry value.

geometryTypeName
Type: System.String

A string that specifies one of the 12 types exposed in the geography type hierarchy.

Return Value

Type: System.Nullable<Boolean>

A string that specifies one of the 12 types exposed in the geography type hierarchy.