次の方法で共有


DbSpatialServices.GetElementCount メソッド (DbGeography)

[このページは、Entity Framework 6 に関するページです。最新バージョンは、'Entity Framework' NuGet パッケージとして入手できます。Entity Framework の詳細については、msdn.com/data/ef を参照してください。]

特定の DbGeography 値が地理コレクションを表す場合、その値に含まれる要素の数を返します。

名前空間:  System.Data.Entity.Spatial
アセンブリ:  EntityFramework (EntityFramework.dll 内)

構文

'宣言
Public MustOverride Function GetElementCount ( _
    geographyValue As DbGeography _
) As Nullable(Of Integer)
'使用
Dim instance As DbSpatialServices 
Dim geographyValue As DbGeography 
Dim returnValue As Nullable(Of Integer)

returnValue = instance.GetElementCount(geographyValue)
public abstract Nullable<int> GetElementCount(
    DbGeography geographyValue
)
public:
virtual Nullable<int> GetElementCount(
    DbGeography^ geographyValue
) abstract
abstract GetElementCount : 
        geographyValue:DbGeography -> Nullable<int> 
public abstract function GetElementCount(
    geographyValue : DbGeography
) : Nullable<int>

パラメーター

戻り値

型 : System.Nullable<Int32>
geographyValue が他の geography 値のコレクションを表す場合は、この geographyValue の要素の数。それ以外の場合は null。

例外

例外 状態
ArgumentNullException

geographyValue が null です。

ArgumentException

geographyValue は、この空間サービスの実装と互換性がありません。

参照

参照

DbSpatialServices クラス

GetElementCount オーバーロード

System.Data.Entity.Spatial 名前空間