Interface IUnitOfWork
Namespace: Common.Contracts
Assembly: Common.dll
UOF pattern uses a single transaction or a single unit of work for multiple insert, update, and delete operations.
public interface IUnitOfWork
Methods
CommitAsync\(CancellationToken\)
Method that dispatch all events and sync all the changes currently running on DBContext and execute them.
Task<int> CommitAsync(CancellationToken cancellationToken = default)
Parameters
cancellationToken CancellationToken
Token used to cancel operation if needed.
Returns
The number of entities modified.
Last modified: 21 May 2024