Skip to content

Latest commit

 

History

History
25 lines (19 loc) · 1.2 KB

UnitOfWork.md

File metadata and controls

25 lines (19 loc) · 1.2 KB

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. (3 constructors)
Connection { get; } Gets the connection.
Initialized { get; } Returns true if the transaction is tried to be started at least once. This always returns true if deferStart is not true.
event OnCommit Occurs when transaction is committed.
event OnRollback Occurs when transaction is rolled back.
Commit() Commits this transaction.
Dispose() Rollbacks the transaction if any and calls onRollback event.

See Also