UnitOfWork class

namespace: Serenity.Data   assemblySerenity.Net.Data

Unit of work implementation.

public class UnitOfWork : IDisposable, IUnitOfWork

Public Members

name description
UnitOfWork(…) Initializes a new instance of the UnitOfWork class.
Connection { get; } Gets the connection.
event OnCommit Occurs when transaction is committed.
event OnRollback Occurs when transaction is rolled back.
Commit() Commits this transaction.
Dispose() Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. Rollbacks the transaction if any.

See Also