ChangeSet 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 set of changes to be processed by a DomainService.

Inheritance Hierarchy


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


Public NotInheritable Class ChangeSet
Dim instance As ChangeSet
public sealed class ChangeSet
public ref class ChangeSet sealed
type ChangeSet =  class end
public final class ChangeSet

The ChangeSet type exposes the following members.


  Name Description
Public method ChangeSet Initializes a new instance of the ChangeSet class.



  Name Description
Public property ChangeSetEntries Gets the collection of ChangeSetEntry objects that this ChangeSet represents.
Public property HasError Gets a value that indicates whether any of the ChangeSetEntry objects has an error.



  Name Description
Public method Associate<TEntity, TStoreEntity>
Public method Equals (Inherited from Object.)
Protected method Finalize (Inherited from Object.)
Public method GetAssociatedChanges<TEntity, TResult>(TEntity, Expression<Func<T, TResult>>)
Public method GetAssociatedChanges<TEntity, TResult>(TEntity, Expression<Func<T, TResult>>, Boolean)
Public method GetAssociatedEntities<TEntity, TStoreEntity> Gets the collection of presentation model entities associated with the specified data store client entity.
Public method GetChangeOperation Gets the ChangeOperation for the specified member of this ChangeSet.
Public method GetHashCode (Inherited from Object.)
Public method GetOriginal<TEntity> Gets the original unmodified entity for the specified entity.
Public method GetType (Inherited from Object.)
Protected method MemberwiseClone (Inherited from Object.)
Public method Replace<TEntity> Replaces the specified client entity with the specified server entity in all ChangeSetEntry objects that are contained in the ChangeSet.
Public method ToString (Inherited from Object.)



Public Function UpdateCustomer(ByVal currentCustomer As Customer)
    this.ObjectContext.Customers.AttachAsModified(currentCustomer, this.ChangeSet.GetOriginal(currentCustomer))
End Function
public void UpdateCustomer(Customer currentCustomer)
    this.ObjectContext.Customers.AttachAsModified(currentCustomer, this.ChangeSet.GetOriginal(currentCustomer));

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


System.ServiceModel.DomainServices.Server Namespace