Owneat Technical Guide main Help

Class OrderingUnitOfWork

Namespace: Ordering.Infrastructure.Persistence
Assembly: Ordering.Infrastructure.dll

public class OrderingUnitOfWork : IUnitOfWork

Inheritance

object ← OrderingUnitOfWork

Implements

IUnitOfWork

Inherited Members

object.Equals\(object?\), object.Equals\(object?, object?\), object.GetHashCode\(\), object.GetType\(\), object.MemberwiseClone\(\), object.ReferenceEquals\(object?, object?\), object.ToString\(\)

Constructors

OrderingUnitOfWork\(OrderingContext, IDomainEventsDispatcher\)

public OrderingUnitOfWork(OrderingContext orderingContext, IDomainEventsDispatcher domainEventsDispatcher)

Parameters

orderingContext OrderingContext

domainEventsDispatcher IDomainEventsDispatcher

Methods

CommitAsync\(CancellationToken\)

Method that dispatch all events and sync all the changes currently running on DBContext and execute them.

public Task<int> CommitAsync(CancellationToken cancellationToken = default)

Parameters

cancellationToken CancellationToken

Token used to cancel operation if needed.

Returns

Task < int \>

The number of entities modified.

Last modified: 21 May 2024