DbSpatialServices.GetElementCount Method
Returns the number of elements in the given value, if it represents a geography collection.
Assembly: EntityFramework (in EntityFramework.dll)
Name | Description | |
---|---|---|
![]() | GetElementCount(DbGeography) | Returns the number of elements in the given DbGeography value, if it represents a geography collection. |
![]() | GetElementCount(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.
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.
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. |