Owneat Technical Guide main Help

Class PaymentUnitOfWork

Namespace: Payment.Infrastructure.Persistence
Assembly: Payment.Infrastructure.dll

public class PaymentUnitOfWork : IUnitOfWork

Inheritance

object ← PaymentUnitOfWork

Implements

IUnitOfWork

Inherited Members

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

Constructors

PaymentUnitOfWork\(PaymentContext, IDomainEventsDispatcher\)

public PaymentUnitOfWork(PaymentContext paymentContext, IDomainEventsDispatcher domainEventsDispatcher)

Parameters

paymentContext PaymentContext

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