DbSpatialServices.GetElementCount Method

 

Returns the number of elements in the given value, if it represents a geography collection.

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

NameDescription
System_CAPS_pubmethodGetElementCount(DbGeography)

Returns the number of elements in the given DbGeography value, if it represents a geography collection.

System_CAPS_pubmethodGetElementCount(DbGeometry)

Returns the number of elements in the given DbGeometry value, if it represents a geometry collection.


DbSpatialServices.GetElementCount Method (DbGeography)

Returns the number of elements in the given DbGeography value, if it represents a geography collection.

public abstract Nullable<int> GetElementCount(
	DbGeography geographyValue
)

Parameters

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

The geography value, which need not represent a geography collection.

Return Value

Type: System.Nullable<Int32>

The number of elements in geographyValue, if it represents a collection of other geography values; otherwise, null.

Exception Condition
ArgumentNullException

geographyValue is null.

ArgumentException

geographyValue is not compatible with this spatial services implementation.


DbSpatialServices.GetElementCount Method (DbGeometry)

Returns the number of elements in the given DbGeometry value, if it represents a geometry collection.

public abstract Nullable<int> GetElementCount(
	DbGeometry geometryValue
)

Parameters

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

The geometry value, which need not represent a geometry collection.

Return Value

Type: System.Nullable<Int32>

The number of elements in geometryValue, if it represents a collection of other geometry values; otherwise, null.

Exception Condition
ArgumentNullException

geometryValue is null.

ArgumentException

geometryValue is not compatible with this spatial services implementation.