Show / Hide Table of Contents

Class UnitOfWorkAttribute

Used to indicate that declaring method (or all methods of the class) is atomic and should be considered as a unit of work (UOW).

Inheritance
System.Object
UnitOfWorkAttribute
Namespace: Volo.Abp.Uow
Assembly: Volo.Abp.Uow.dll
Syntax
public class UnitOfWorkAttribute : Attribute
Remarks

This attribute has no effect if there is already a unit of work before calling this method. It uses the ambient UOW in this case.

Constructors

UnitOfWorkAttribute()

Declaration
public UnitOfWorkAttribute()

UnitOfWorkAttribute(Boolean)

Declaration
public UnitOfWorkAttribute(bool isTransactional)
Parameters
Type Name Description
System.Boolean isTransactional

UnitOfWorkAttribute(Boolean, IsolationLevel)

Declaration
public UnitOfWorkAttribute(bool isTransactional, IsolationLevel isolationLevel)
Parameters
Type Name Description
System.Boolean isTransactional
IsolationLevel isolationLevel

UnitOfWorkAttribute(Boolean, IsolationLevel, Int32)

Declaration
public UnitOfWorkAttribute(bool isTransactional, IsolationLevel isolationLevel, int timeout)
Parameters
Type Name Description
System.Boolean isTransactional
IsolationLevel isolationLevel
System.Int32 timeout

Properties

IsDisabled

Used to prevent starting a unit of work for the method. If there is already a started unit of work, this property is ignored. Default: false.

Declaration
public bool IsDisabled { get; set; }
Property Value
Type Description
System.Boolean

IsolationLevel

If this UOW is transactional, this option indicated the isolation level of the transaction. Uses default value if not supplied.

Declaration
public IsolationLevel? IsolationLevel { get; set; }
Property Value
Type Description
System.Nullable<IsolationLevel>

IsTransactional

Is this UOW transactional? Uses default value if not supplied.

Declaration
public bool? IsTransactional { get; set; }
Property Value
Type Description
System.Nullable<System.Boolean>

Timeout

Timeout of UOW As milliseconds. Uses default value if not supplied.

Declaration
public int? Timeout { get; set; }
Property Value
Type Description
System.Nullable<System.Int32>

Methods

SetOptions(AbpUnitOfWorkOptions)

Declaration
public virtual void SetOptions(AbpUnitOfWorkOptions options)
Parameters
Type Name Description
AbpUnitOfWorkOptions options

Extension Methods

AbpObjectExtensions.As<T>(Object)
AbpObjectExtensions.To<T>(Object)
AbpObjectExtensions.IsIn<T>(T, T[])
AbpObjectExtensions.If<T>(T, Boolean, Func<T, T>)
AbpObjectExtensions.If<T>(T, Boolean, Action<T>)
LockExtensions.Locking(Object, Action)
LockExtensions.Locking<T>(T, Action<T>)
LockExtensions.Locking<TResult>(Object, Func<TResult>)
LockExtensions.Locking<T, TResult>(T, Func<T, TResult>)
Back to top Powered by Volosoft