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 | |
---|---|---|
ChangeSet | Initializes a new instance of the ChangeSet class. |
Top
Properties
Name | Description | |
---|---|---|
ChangeSetEntries | Gets the collection of ChangeSetEntry objects that this ChangeSet represents. | |
HasError | Gets a value that indicates whether any of the ChangeSetEntry objects has an error. |
Top
Methods
Name | Description | |
---|---|---|
Associate<TEntity, TStoreEntity> | ||
Equals | (Inherited from Object.) | |
Finalize | (Inherited from Object.) | |
GetAssociatedChanges<TEntity, TResult>(TEntity, Expression<Func<T, TResult>>) | ||
GetAssociatedChanges<TEntity, TResult>(TEntity, Expression<Func<T, TResult>>, Boolean) | ||
GetAssociatedEntities<TEntity, TStoreEntity> | Gets the collection of presentation model entities associated with the specified data store client entity. | |
GetChangeOperation | Gets the ChangeOperation for the specified member of this ChangeSet. | |
GetHashCode | (Inherited from Object.) | |
GetOriginal<TEntity> | Gets the original unmodified entity for the specified entity. | |
GetType | (Inherited from Object.) | |
MemberwiseClone | (Inherited from Object.) | |
Replace<TEntity> | Replaces the specified client entity with the specified server entity in all ChangeSetEntry objects that are contained in the ChangeSet. | |
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.