Compartilhar via


EntityCollection<TEntity>.Remove Method

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

Removes the specified entity from this collection.

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

Syntax

'Declaration
Public Sub Remove ( _
    entity As TEntity _
)
'Usage
Dim instance As EntityCollection
Dim entity As TEntity

instance.Remove(entity)
public void Remove(
    TEntity entity
)
public:
void Remove(
    TEntity entity
)
member Remove : 
        entity:'TEntity -> unit 
public function Remove(
    entity : TEntity
)

Parameters

  • entity
    Type: TEntity
    The entity to remove.

Examples

If previous <> Value Then
    Me._employee2.Entity = Nothing
    previous.Employee1.Remove(Me)
    Me.Employee1.EntityRemoved += New EventHandler(Of EntityCollectionChangedEventArgs(Of Employee))(Employee1_EntityRemoved)
End If
if ((previous != null))
{
    this._employee2.Entity = null;
    previous.Employee1.Remove(this);
    this.Employee1.EntityRemoved += new EventHandler<EntityCollectionChangedEventArgs<Employee>>(Employee1_EntityRemoved);
}

See Also

Reference

EntityCollection<TEntity> Class

System.ServiceModel.DomainServices.Client Namespace