EntityCollection<TEntity> Class

WCF RIA Services

[WCF RIA Services Version 1 Service Pack 2 is compatible with either .NET framework 4 or .NET Framework 4.5, and with either Silverlight 4 or Silverlight 5.]

Represents a collection of associated entities.


Namespace:  System.ServiceModel.DomainServices.Client
Assembly:  System.ServiceModel.DomainServices.Client (in System.ServiceModel.DomainServices.Client.dll)

generic<typename TEntity>
where TEntity : Entity
public ref class EntityCollection sealed : IEnumerable<TEntity>, 
	IEnumerable, INotifyCollectionChanged, INotifyPropertyChanged, ICollectionViewFactory

Type Parameters


The type of Entity in the collection.

The EntityCollection<TEntity> type exposes the following members.

Public methodEntityCollection<TEntity>(Entity, String, Func<TEntity, Boolean>)Initializes a new instance of the EntityCollection<TEntity> class with the specified parent, name of the collection on the parent, and filter function.
Public methodEntityCollection<TEntity>(Entity, String, Func<TEntity, Boolean>, Action<TEntity>, Action<TEntity>)Initializes a new instance of the EntityCollection<TEntity> class with the specified parent, name of the collection on the parent, and functions for filtering, attaching, and detaching.

Public propertyCountGets the current count of entities in this collection.

Public methodAddAdds the specified entity to this collection.
Public methodEquals (Inherited from Object.)
Protected methodFinalize (Inherited from Object.)
Public methodGetEnumeratorReturns an enumerator for this collection.
Public methodGetHashCode (Inherited from Object.)
Public methodGetType (Inherited from Object.)
Protected methodMemberwiseClone (Inherited from Object.)
Public methodRemoveRemoves the specified entity from this collection.
Public methodToStringReturns a textual representation of the collection. (Overrides Object::ToString().)

Public eventEntityAddedRaised when an Entity is added to this collection.
Public eventEntityRemovedRaised when an Entity is removed from this collection.

Explicit interface implemetationPrivate eventINotifyCollectionChanged::CollectionChangedRaised when the contents of the collection changes.
Explicit interface implemetationPrivate methodICollectionViewFactory::CreateViewReturns a custom view for specialized sorting, filtering, grouping, and currency.
Explicit interface implemetationPrivate methodIEnumerable::GetEnumeratorReturns an enumerator for this collection.
Explicit interface implemetationPrivate eventINotifyPropertyChanged::PropertyChangedRaised when a property on this collection changes.

No code example is currently available or this language may not be supported.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.