DataServiceContext.WritingEntity Event

Occurs after an entity has been fully serialized into XML in a request message.

Namespace:  System.Data.Services.Client
Assembly:  Microsoft.Data.Services.Client (in Microsoft.Data.Services.Client.dll)

Syntax

'Declaration
Public Event WritingEntity As EventHandler(Of ReadingWritingEntityEventArgs)
'Usage
Dim instance As DataServiceContext 
Dim handler As EventHandler(Of ReadingWritingEntityEventArgs)

AddHandler instance.WritingEntity, handler
public event EventHandler<ReadingWritingEntityEventArgs> WritingEntity
public:
 event EventHandler<ReadingWritingEntityEventArgs^>^ WritingEntity {
    void add (EventHandler<ReadingWritingEntityEventArgs^>^ value);
    void remove (EventHandler<ReadingWritingEntityEventArgs^>^ value);
}
member WritingEntity : IEvent<EventHandler<ReadingWritingEntityEventArgs>,
    ReadingWritingEntityEventArgs>
JScript supports the use of events, but not the declaration of new ones.

Remarks

Handling the WritingEntity event enables you to change the XML in a request before it is sent.

The WritingEntity event may occur on a different thread when you call BeginSaveChanges(SaveChangesOptions, AsyncCallback, Object) without including Batch in the supplied SaveChangesOptions value.

See Also

Reference

DataServiceContext Class

System.Data.Services.Client Namespace