Share via


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

System.Object
  System.ServiceModel.DomainServices.Server.ChangeSet

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

Syntax

'Declaration
Public NotInheritable Class ChangeSet
'Usage
Dim instance As ChangeSet
public sealed class ChangeSet
public ref class ChangeSet sealed
[<SealedAttribute>]
type ChangeSet =  class end
public final class ChangeSet

The ChangeSet type exposes the following members.

Constructors

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

Top

Properties

  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.

Top

Methods

  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.)

Top

Examples

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

Reference

System.ServiceModel.DomainServices.Server Namespace