Compartilhar via


EntitySet Class

[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 Entity instances.

Inheritance Hierarchy

System.Object
  System.ServiceModel.DomainServices.Client.EntitySet
    System.ServiceModel.DomainServices.Client.EntitySet<TEntity>

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

Syntax

'Declaration
Public MustInherit Class EntitySet _
    Implements IEnumerable, INotifyCollectionChanged, IRevertibleChangeTracking, IChangeTracking,  _
    INotifyPropertyChanged
'Usage
Dim instance As EntitySet
public abstract class EntitySet : IEnumerable, 
    INotifyCollectionChanged, IRevertibleChangeTracking, IChangeTracking, INotifyPropertyChanged
public ref class EntitySet abstract : IEnumerable, 
    INotifyCollectionChanged, IRevertibleChangeTracking, IChangeTracking, INotifyPropertyChanged
[<AbstractClassAttribute>]
type EntitySet =  
    class
        interface IEnumerable
        interface INotifyCollectionChanged
        interface IRevertibleChangeTracking
        interface IChangeTracking
        interface INotifyPropertyChanged
    end
public abstract class EntitySet implements IEnumerable, INotifyCollectionChanged, IRevertibleChangeTracking, IChangeTracking, INotifyPropertyChanged

The EntitySet type exposes the following members.

Properties

  Name Description
Public property CanAdd Gets a value indicating whether the set allows new entities to be added.
Public property CanEdit Gets a value indicating whether entities in the set can be edited.
Public property CanRemove Gets a value indicating whether the set allows entities to be removed.
Public property Count Gets the current count of entities in the set.
Public property EntityContainer Gets the container for this EntitySet.
Public property EntityType Gets the type of entity contained by this EntitySet.
Public property HasChanges Gets a value indicating whether this EntitySet currently has any pending changes.
Public property IsReadOnly Gets a value indicating whether this set supports update operations.
Protected property List Gets the backing list for this EntitySet.

Top

Methods

  Name Description
Protected method AcceptChanges Accepts all changes made to this EntitySet.
Public method Add Adds the specified Entity to this EntitySet.
Public method Attach Attaches the specified Entity to this EntitySet in an unmodified state.
Public method Clear Clears all entities from the set.
Protected method CreateEntity Creates a new entity.
Protected method CreateList Creates the storage list for the set.
Public method Detach Detaches the specified Entity from this EntitySet.
Public method Equals (Inherited from Object.)
Protected method Finalize (Inherited from Object.)
Public method GetEnumerator Gets an enumerator for the collection.
Public method GetHashCode (Inherited from Object.)
Public method GetType (Inherited from Object.)
Protected method MemberwiseClone (Inherited from Object.)
Protected method OnCollectionChanged Called whenever the collection changes.
Protected method OnPropertyChanged Called when an EntitySet property has changed.
Protected method RaisePropertyChanged Raises the PropertyChanged event for the specified property.
Protected method RejectChanges Reverts all changes made to this EntitySet.
Public method Remove Removes the specified entity from the set.
Public method ToString (Inherited from Object.)

Top

Events

  Name Description
Public event PropertyChanged Occurs when a property is changed.

Top

Explicit Interface Implementations

  Name Description
Explicit interface implemetationPrivate method IChangeTracking.AcceptChanges Resets the object’s state to unchanged by accepting the modifications.
Explicit interface implemetationPrivate event INotifyCollectionChanged.CollectionChanged Occurs when the collection is changed, or is reset.
Explicit interface implemetationPrivate method IEnumerable.GetEnumerator Returns an enumerator that iterates through a collection.
Explicit interface implemetationPrivate property IChangeTracking.IsChanged Gets the object's changed status.
Explicit interface implemetationPrivate method IRevertibleChangeTracking.RejectChanges Resets the object’s state to unchanged by rejecting the modifications.

Top

Thread Safety

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

See Also

Reference

System.ServiceModel.DomainServices.Client Namespace