共用方式為


EntityCollection<TEntity>.Count 屬性

定義

取得集合中包含的物件數量。

public:
 property int Count { int get(); };
public int Count { get; }
member this.Count : int
member this.Count : int
Public ReadOnly Property Count As Integer

屬性值

包含在 中的 EntityCollection<TEntity>元素數量。

實作

備註

Count 屬性會取得目前本地集合中實體的數量,並不會反映資料來源中收藏的大小。 計數為零不一定表示相關集合為空。 要確定資料來源中的集合大小,呼叫方法 Load 或在查詢路徑中包含相關物件。 如需詳細資訊,請參閱 載入相關物件

適用於