UnitOfWork class
namespace: Serenity.Data assembly: Serenity.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
- interface IUnitOfWork
- Source: UnitOfWork.cs