Compartilhar via


EntityCollection<TEntity>.EntityAdded Event

[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.]

Raised when an Entity is added to this collection.

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

Syntax

'Declaration
Public Event EntityAdded As EventHandler(Of EntityCollectionChangedEventArgs(Of TEntity))
'Usage
Dim instance As EntityCollection
Dim handler As EventHandler(Of EntityCollectionChangedEventArgs(Of TEntity))

AddHandler instance.EntityAdded, handler
public event EventHandler<EntityCollectionChangedEventArgs<TEntity>> EntityAdded
public:
 event EventHandler<EntityCollectionChangedEventArgs<TEntity>^>^ EntityAdded {
    void add (EventHandler<EntityCollectionChangedEventArgs<TEntity>^>^ value);
    void remove (EventHandler<EntityCollectionChangedEventArgs<TEntity>^>^ value);
}
member EntityAdded : IEvent<EventHandler<EntityCollectionChangedEventArgs<'TEntity>>,
    EntityCollectionChangedEventArgs<'TEntity>>
JScript supports the use of events, but not the declaration of new ones.

Examples

Me.Employee1.EntityAdded += New EventHandler(Of EntityCollectionChangedEventArgs(Of Employee))(Employee1_EntityAdded)
this.Employee1.EntityAdded += new EventHandler<EntityCollectionChangedEventArgs<Employee>>(Employee1_EntityAdded);

See Also

Reference

EntityCollection<TEntity> Class

System.ServiceModel.DomainServices.Client Namespace