EntitySet<TEntity> 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 that provides change tracking and other services.
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 NotInheritable Class EntitySet(Of TEntity As Entity) _
Inherits EntitySet _
Implements IEnumerable(Of TEntity), IEnumerable, ICollectionViewFactory
'Usage
Dim instance As EntitySet(Of TEntity)
public sealed class EntitySet<TEntity> : EntitySet,
IEnumerable<TEntity>, IEnumerable, ICollectionViewFactory
where TEntity : Entity
generic<typename TEntity>
where TEntity : Entity
public ref class EntitySet sealed : public EntitySet,
IEnumerable<TEntity>, IEnumerable, ICollectionViewFactory
[<SealedAttribute>]
type EntitySet<'TEntity when 'TEntity : Entity> =
class
inherit EntitySet
interface IEnumerable<'TEntity>
interface IEnumerable
interface ICollectionViewFactory
end
JScript does not support generic types and methods.
Type Parameters
- TEntity
The type of Entity this entity set will contain.
The EntitySet<TEntity> type exposes the following members.
Constructors
Name | Description | |
---|---|---|
EntitySet<TEntity> | Initializes a new instance of EntitySet<TEntity> class. |
Top
Properties
Name | Description | |
---|---|---|
CanAdd | Gets a value indicating whether the set allows new entities to be added. (Inherited from EntitySet.) | |
CanEdit | Gets a value indicating whether entities in the set can be edited. (Inherited from EntitySet.) | |
CanRemove | Gets a value indicating whether the set allows entities to be removed. (Inherited from EntitySet.) | |
Count | Gets the current count of entities in the set. (Inherited from EntitySet.) | |
EntityContainer | Gets the container for this EntitySet. (Inherited from EntitySet.) | |
EntityType | Gets the type of entity contained by this EntitySet. (Inherited from EntitySet.) | |
HasChanges | Gets a value indicating whether this EntitySet currently has any pending changes. (Inherited from EntitySet.) | |
IsReadOnly | Gets a value indicating whether this set supports update operations. (Inherited from EntitySet.) | |
List | Gets the backing list for this EntitySet. (Inherited from EntitySet.) |
Top
Methods
Name | Description | |
---|---|---|
AcceptChanges | Accepts all changes made to this EntitySet. (Inherited from EntitySet.) | |
Add(TEntity) | Adds the specified entity to this entity set. Also, recursively adds all unattached entities that are reachable through associations. | |
Add(Entity) | Adds the specified Entity to this EntitySet. (Inherited from EntitySet.) | |
Attach(TEntity) | Attaches the specified Entity to this entity set in an unmodified state. Also, recursively attaches all unattached entities that are reachable through associations. | |
Attach(Entity) | Attaches the specified Entity to this EntitySet in an unmodified state. (Inherited from EntitySet.) | |
Clear | Clears all entities from the set. (Inherited from EntitySet.) | |
CreateEntity | Creates a new entity. (Inherited from EntitySet.) | |
CreateList | Creates the storage list for the set. (Inherited from EntitySet.) | |
Detach(TEntity) | Detaches the Entity from this entity set. | |
Detach(Entity) | Detaches the specified Entity from this EntitySet. (Inherited from EntitySet.) | |
Equals | (Inherited from Object.) | |
Finalize | (Inherited from Object.) | |
GetEnumerator | Returns an enumerator for this entity set. | |
GetHashCode | (Inherited from Object.) | |
GetType | (Inherited from Object.) | |
MemberwiseClone | (Inherited from Object.) | |
OnCollectionChanged | Called whenever the collection changes. (Inherited from EntitySet.) | |
OnPropertyChanged | Called when an EntitySet property has changed. (Inherited from EntitySet.) | |
RaisePropertyChanged | Raises the PropertyChanged event for the specified property. (Inherited from EntitySet.) | |
RejectChanges | Reverts all changes made to this EntitySet. (Inherited from EntitySet.) | |
Remove(TEntity) | Removes the specified entity from the set. If the entity is the root of a compositional hierarchy, all child entities will also be removed. | |
Remove(Entity) | Removes the specified entity from the set. (Inherited from EntitySet.) | |
ToString | (Inherited from Object.) |
Top
Events
Name | Description | |
---|---|---|
EntityAdded | Occurs when an Entity is added to this entity set. | |
EntityRemoved | Occurs when an Entity is removed from this entity set. | |
PropertyChanged | Occurs when a property is changed. (Inherited from EntitySet.) |
Top
Explicit Interface Implementations
Name | Description | |
---|---|---|
IChangeTracking.AcceptChanges | Resets the object’s state to unchanged by accepting the modifications. (Inherited from EntitySet.) | |
INotifyCollectionChanged.CollectionChanged | Occurs when the collection is changed, or is reset. (Inherited from EntitySet.) | |
ICollectionViewFactory.CreateView | Returns a custom view for specialized sorting, filtering, grouping, and currency. | |
IEnumerable.GetEnumerator | Returns an enumerator that iterates through a collection. (Inherited from EntitySet.) | |
IEnumerable<TEntity>.GetEnumerator | Returns an enumerator for this entity set. | |
IChangeTracking.IsChanged | Gets the object's changed status. (Inherited from EntitySet.) | |
IRevertibleChangeTracking.RejectChanges | Resets the object’s state to unchanged by rejecting the modifications. (Inherited from EntitySet.) |
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.