Show / Hide Table of Contents

Interface IUnitOfWork

Inherited Members
IDatabaseApiContainer.FindDatabaseApi(string)
IDatabaseApiContainer.AddDatabaseApi(string, IDatabaseApi)
IDatabaseApiContainer.GetOrAddDatabaseApi(string, Func<IDatabaseApi>)
IServiceProviderAccessor.ServiceProvider
ITransactionApiContainer.FindTransactionApi(string)
ITransactionApiContainer.AddTransactionApi(string, ITransactionApi)
ITransactionApiContainer.GetOrAddTransactionApi(string, Func<ITransactionApi>)
IDisposable.Dispose()
Namespace: Volo.Abp.Uow
Assembly: Volo.Abp.Uow.dll
Syntax
public interface IUnitOfWork : IDatabaseApiContainer, IServiceProviderAccessor, ITransactionApiContainer, IDisposable

Properties

Id

Declaration
Guid Id { get; }
Property Value
Type Description
Guid

IsCompleted

Declaration
bool IsCompleted { get; }
Property Value
Type Description
bool

IsDisposed

Declaration
bool IsDisposed { get; }
Property Value
Type Description
bool

IsReserved

Declaration
bool IsReserved { get; }
Property Value
Type Description
bool

Items

Declaration
Dictionary<string, object> Items { get; }
Property Value
Type Description
Dictionary<string, object>

Options

Declaration
IAbpUnitOfWorkOptions Options { get; }
Property Value
Type Description
IAbpUnitOfWorkOptions

Outer

Declaration
IUnitOfWork? Outer { get; }
Property Value
Type Description
IUnitOfWork

ReservationName

Declaration
string? ReservationName { get; }
Property Value
Type Description
string

Methods

AddOrReplaceDistributedEvent(UnitOfWorkEventRecord, Predicate<UnitOfWorkEventRecord>?)

Declaration
void AddOrReplaceDistributedEvent(UnitOfWorkEventRecord eventRecord, Predicate<UnitOfWorkEventRecord>? replacementSelector = null)
Parameters
Type Name Description
UnitOfWorkEventRecord eventRecord
Predicate<UnitOfWorkEventRecord> replacementSelector

AddOrReplaceLocalEvent(UnitOfWorkEventRecord, Predicate<UnitOfWorkEventRecord>?)

Declaration
void AddOrReplaceLocalEvent(UnitOfWorkEventRecord eventRecord, Predicate<UnitOfWorkEventRecord>? replacementSelector = null)
Parameters
Type Name Description
UnitOfWorkEventRecord eventRecord
Predicate<UnitOfWorkEventRecord> replacementSelector

CompleteAsync(CancellationToken)

Declaration
Task CompleteAsync(CancellationToken cancellationToken = default)
Parameters
Type Name Description
CancellationToken cancellationToken
Returns
Type Description
Task

Initialize(AbpUnitOfWorkOptions)

Declaration
void Initialize(AbpUnitOfWorkOptions options)
Parameters
Type Name Description
AbpUnitOfWorkOptions options

OnCompleted(Func<Task>)

Declaration
void OnCompleted(Func<Task> handler)
Parameters
Type Name Description
Func<Task> handler

Reserve(string)

Declaration
void Reserve(string reservationName)
Parameters
Type Name Description
string reservationName

RollbackAsync(CancellationToken)

Declaration
Task RollbackAsync(CancellationToken cancellationToken = default)
Parameters
Type Name Description
CancellationToken cancellationToken
Returns
Type Description
Task

SaveChangesAsync(CancellationToken)

Declaration
Task SaveChangesAsync(CancellationToken cancellationToken = default)
Parameters
Type Name Description
CancellationToken cancellationToken
Returns
Type Description
Task

SetOuter(IUnitOfWork?)

Declaration
void SetOuter(IUnitOfWork? outer)
Parameters
Type Name Description
IUnitOfWork outer

Events

Disposed

Declaration
event EventHandler<UnitOfWorkEventArgs> Disposed
Event Type
Type Description
EventHandler<UnitOfWorkEventArgs>

Failed

Declaration
event EventHandler<UnitOfWorkFailedEventArgs> Failed
Event Type
Type Description
EventHandler<UnitOfWorkFailedEventArgs>

Extension Methods

AbpObjectExtensions.As<T>(object)
AbpObjectExtensions.To<T>(object)
LockExtensions.Locking(object, Action)
LockExtensions.Locking<TResult>(object, Func<TResult>)
AbpObjectExtensions.If<T>(T, bool, Action<T>)
AbpObjectExtensions.If<T>(T, bool, Func<T, T>)
AbpObjectExtensions.IsIn<T>(T, IEnumerable<T>)
AbpObjectExtensions.IsIn<T>(T, params T[])
AbpQueryableExtensions.OrderByIf<T, TQueryable>(TQueryable, bool, string)
AbpQueryableExtensions.PageBy<T, TQueryable>(TQueryable, int, int)
AbpQueryableExtensions.WhereIf<T, TQueryable>(TQueryable, bool, Expression<Func<T, bool>>)
AbpQueryableExtensions.WhereIf<T, TQueryable>(TQueryable, bool, Expression<Func<T, int, bool>>)
AbpOpenIddictQueryableExtensions.SkipIf<T, TQueryable>(TQueryable, bool, int?)
AbpOpenIddictQueryableExtensions.TakeIf<T, TQueryable>(TQueryable, bool, int?)
LockExtensions.Locking<T>(T, Action<T>)
LockExtensions.Locking<T, TResult>(T, Func<T, TResult>)
UnitOfWorkExtensions.AddItem<TValue>(IUnitOfWork, string, TValue)
UnitOfWorkExtensions.GetItemOrDefault<TValue>(IUnitOfWork, string)
UnitOfWorkExtensions.GetOrAddItem<TValue>(IUnitOfWork, string, Func<string, TValue>)
UnitOfWorkExtensions.IsReservedFor(IUnitOfWork, string)
UnitOfWorkExtensions.RemoveItem(IUnitOfWork, string)
In this article
Back to top Powered by ABP.IO Platform