TechTalk Genome v4.2

UpdateEventArgs Class

Provides supplementary information for the Context.BeforeUpdateObject and Context.AfterUpdateObject events.

For a list of all members of this type, see UpdateEventArgs Members.


public class UpdateEventArgs : EventArgs


An instance of the UpdateEventArgs structure is provided as suplementary information by the Context for subscribers of either the Context.BeforeUpdateObject or the Context.AfterUpdateObject events. The properies of the structure can be used to determine the state of the persistent object being updated into its corresponding DataDomain and to acquire the physical database connection and transaction used to communicate with the underlying relational database server. This allows the subscribers of the event to perform additional low-lever operations by issueing T-SQL statements within the same physical database transaction that is used by the Context to execute the update batch. Doing so will ensure that changes performed by the event handler will be committed only if the whole update batch was successfull.

The Connection and Transaction properties can be used to acquire the physical database connection and transaction used by the Context to perform the update batch. The handler of the event can create new instances of IDbCommand using the method IDbConnection.CreateCommand. The value of the UpdateEvent property indicates the type of update operation (INSERT, UPDATE or DELETE) being performed on the specified persistent object. The persistent object being synchronized is specified either by the sender parameter of the event or by the this reference of the persistent object.


Namespace: TechTalk.Genome

Assembly: TechTalk.Genome (in TechTalk.Genome.dll)


Editions: Professional, Evaluation, Express

Database Platforms: Microsoft SQL Server 2000, Microsoft SQL Server 2005, Orcale 9i Release 2, Oracle 10g Release 2

See Also

UpdateEventArgs Members | TechTalk.Genome Namespace | Context.BeforeUpdateObject | Context.AfterUpdateObject | UpdateEventHandler