Compartilhar via


EntityContainer 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 cache of entities in the form of a collection of EntitySet objects.

Inheritance Hierarchy

System.Object
  System.ServiceModel.DomainServices.Client.EntityContainer

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

Syntax

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

The EntityContainer type exposes the following members.

Constructors

  Name Description
Protected method EntityContainer Initializes a new instance of the EntityContainer class.

Top

Properties

  Name Description
Public property EntitySets Gets the collection of EntitySet objects in this EntityContainer.
Public property HasChanges Gets a value indicating whether this EntityContainer currently has any pending changes.

Top

Methods

  Name Description
Protected method AcceptChanges Accepts all changes that have been made to entities or the EntitySet objects in this container.
Public method AddReference Adds a reference to an external EntitySet.
Public method Clear Clears the contents of all EntitySet objects in this container.
Protected method CreateEntitySet<TEntity>() Creates a new EntitySet in this container for the specified entity type.
Protected method CreateEntitySet<TEntity>(EntitySetOperations) Create an EntitySet in this container for the specified EntitySetOperations.
Public method Equals (Inherited from Object.)
Protected method Finalize (Inherited from Object.)
Public method GetChanges Returns an EntityChangeSet containing the current set of pending changes.
Public method GetEntitySet(Type) Gets the EntitySet for the specified Entity type.
Public method GetEntitySet<TEntity>() Gets the EntitySet for the specified Entity type.
Public method GetHashCode (Inherited from Object.)
Public method GetType (Inherited from Object.)
Public method LoadEntities(IEnumerable) Loads the specified collection of entities into this EntityContainer.
Public method LoadEntities(IEnumerable, LoadBehavior) Loads the specified collection of entities into this EntityContainer using the specified load behavior.
Protected method MemberwiseClone (Inherited from Object.)
Protected method RaisePropertyChanged Raises the PropertyChanged event for the specified property.
Protected method RejectChanges Reverts all changes that have been made to the entities or the EntitySet objects in this container.
Public method ToString (Inherited from Object.)
Public method TryGetEntitySet Tries to get the entity set for the specified Entity type.

Top

Events

  Name Description
Public event PropertyChanged Occurs when a property has 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 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