Class NestedUnitOfWork
- Namespace
- DevExpress.Xpo
- Assembly
- DevExpress.Xpo.v24.1.dll
A nested unit of work.
public class NestedUnitOfWork : UnitOfWork, IComponent, IDisposable, ISupportInitialize, IPersistentValueExtractor, ISessionProvider, IObjectLayerProvider, IDataLayerProvider, IXPDictionaryProvider, IWideDataStorage, ICommandChannel, ICommandChannelAsync
- Inheritance
-
NestedUnitOfWork
- Implements
-
ICommandChannelICommandChannelAsync
- Inherited Members
-
Session.EvaluateInTransactionAsync<ClassType>(CriteriaOperator, CriteriaOperator, CancellationToken)
- Extension Methods
Constructors
NestedUnitOfWork(Session)
protected NestedUnitOfWork(Session parent)
Parameters
parent
Session
Properties
Parent
Gets the parent session or unit of work.
public Session Parent { get; }
Property Value
Methods
GetNestedObject(object)
Returns the object in the current unit of work which is the ‘copy’ of the specified object that is owned by the parent Session or UnitOfWork.
public object GetNestedObject(object obj)
Parameters
obj
objectThe parent object whose ‘copy’ in the nested unit of work is returned.
Returns
- object
The object in the current unit of work which is the ‘copy’ of the specified object.
GetNestedObject<T>(T)
Returns the object of the type designated by the specified generic type parameter, which is the ‘copy’ of the specified object owned by the parent session.
public T GetNestedObject<T>(T obj)
Parameters
obj
TThe parent object of the type designated by the specified generic type parameter whose ‘copy’ in the nested unit of work is returned.
Returns
- T
The object in the current unit of work which is the ‘copy’ of the specified object.
Type Parameters
T
GetNestedObjects(params object[])
Returns the objects in the current unit of work which are ‘copies’ of the specified objects that are owned by the parent Session or UnitOfWork.
public object[] GetNestedObjects(params object[] parentObjects)
Parameters
parentObjects
object[]The parent objects whose ‘copies’ in the nested unit of work are returned.
Returns
- object[]
The objects in the current unit of work which are ‘copies’ of the specified object.
GetParentObject(object)
Returns the object in the parent Session or UnitOfWork whose ‘copy’ in the current unit of work is specified.
public object GetParentObject(object obj)
Parameters
obj
objectThe object in the current unit of work which is the ‘copy’ of the returned object.
Returns
- object
The parent object whose ‘copy’ in the current unit of work is specified.
GetParentObject<T>(T)
Returns the object in the parent session of the type designated by the specified generic type parameter, whose ‘copy’ in the current unit of work is specified.
public T GetParentObject<T>(T obj)
Parameters
obj
TThe object in the current unit of work which is the ‘copy’ of the returned object.
Returns
- T
The parent object whose ‘copy’ in the current unit of work is specified.
Type Parameters
T
OnAfterCommitTransaction()
protected override void OnAfterCommitTransaction()
OnBeforeCommitTransaction()
protected override void OnBeforeCommitTransaction()
TryGetNestedObject(object)
This member supports the internal infrastructure and is not intended to be used directly from your code.
public object TryGetNestedObject(object obj)
Parameters
obj
object