Interface IUnitOfWork
- Namespace
- KYS.EFCore.Library
- Assembly
- KYS.EFCore.Library.dll
Defines an explicit unit of work: a transaction that is started, then either committed or rolled back.
Disposing the unit of work rolls back any transaction that has not been committed.
public interface IUnitOfWork : IDisposable, IAsyncDisposable
- Inherited Members
Methods
BeginAsync()
Starts a new transaction.
Task BeginAsync()
Returns
- Task
A task that represents the asynchronous operation.
CommitAsync()
Saves the pending changes and commits the current transaction.
Task CommitAsync()
Returns
- Task
A task that represents the asynchronous operation.
RollbackAsync()
Rolls back the current transaction.
Task RollbackAsync()
Returns
- Task
A task that represents the asynchronous operation.