แก้ไข

แชร์ผ่าน


EntityCollection<TEntity>.Count Property

Definition

Gets the number of objects that are contained in the collection.

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

Property Value

The number of elements that are contained in the EntityCollection<TEntity>.

Implements

Remarks

The Count property gets the number of entities currently in the local collection and does not reflect the size of the collection in the data source. A count of zero does not necessarily indicate that the related collection is empty. To determine the collection size in the data source, call the Load method or include the related object in the query path. For more information, see Loading Related Objects.

Applies to