Owneat Technical Guide main Help

Class UserUnitOfWork

Namespace: Identity.Infrastructure.Persistence
Assembly: Identity.Infrastructure.dll

public class UserUnitOfWork : IUnitOfWork

Inheritance

object ← UserUnitOfWork

Implements

IUnitOfWork

Inherited Members

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

Constructors

UserUnitOfWork\(UserContext, IDomainEventsDispatcher\)

public UserUnitOfWork(UserContext userContext, IDomainEventsDispatcher domainEventsDispatcher)

Parameters

userContext UserContext

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