TransactionlessUnitOfWork class

namespace: Serenity.Data   assemblySerenity.Net.Services

Unit of work implementation without an underlying actual transaction. Use with care only to pass a IUnitOfWork instance to some methods that you don't want to actually start a transaction.

public class TransactionlessUnitOfWork : IDisposable, IUnitOfWork
parameter description
connection The connection.

Public Members

name description
TransactionlessUnitOfWork(…) Unit of work implementation without an underlying actual transaction. Use with care only to pass a IUnitOfWork instance to some methods that you don't want to actually start a transaction.
Connection { get; } Gets the connection.
event OnCommit Occurs when Commit is called as there is no underlying transaction.
event OnRollback Occurs when Dispose is called as there is no underlying transaction.
Commit() Does nothing other than calling onCommit events as there is no underlying transaction.
Dispose() Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

Exceptions

exception condition
ArgumentNullException connection

Remarks

Initializes a new instance of the class.

See Also