C# Class Common.Infrastructure.Persistence.Ef.Transactions.DbContextTransactionExecutor

This implementation of ITransactionExecutor guarantees that all operations on DbContext will be done in the same transaction (including querying and saving data). In case of nesting there will be only one topmost transaction.
Inheritance: ITransactionExecutor
Afficher le fichier Open project: KrzysztofBranicki/hexagonal-architecture-sample

Méthodes publiques

Méthode Description
DbContextTransactionExecutor ( DbContext dbContext ) : System
EnlistActionToExecuteAfterSuccessfulCommit ( System.Action action ) : void
EnlistActionToExecuteAfterSuccessfulCommitAsync ( Func asyncAction ) : System.Threading.Tasks.Task
ExecuteInTransaction ( System.Action action ) : void
ExecuteInTransactionAsync ( Func asyncAction ) : System.Threading.Tasks.Task

Private Methods

Méthode Description
ExecutePostCommitActions ( ) : void
ExecutePostCommitActionsAsync ( ) : System.Threading.Tasks.Task
WeAreAlreadyRunningInsideTransaction ( ) : bool

Method Details

DbContextTransactionExecutor() public méthode

public DbContextTransactionExecutor ( DbContext dbContext ) : System
dbContext DbContext
Résultat System

EnlistActionToExecuteAfterSuccessfulCommit() public méthode

public EnlistActionToExecuteAfterSuccessfulCommit ( System.Action action ) : void
action System.Action
Résultat void

EnlistActionToExecuteAfterSuccessfulCommitAsync() public méthode

public EnlistActionToExecuteAfterSuccessfulCommitAsync ( Func asyncAction ) : System.Threading.Tasks.Task
asyncAction Func
Résultat System.Threading.Tasks.Task

ExecuteInTransaction() public méthode

public ExecuteInTransaction ( System.Action action ) : void
action System.Action
Résultat void

ExecuteInTransactionAsync() public méthode

public ExecuteInTransactionAsync ( Func asyncAction ) : System.Threading.Tasks.Task
asyncAction Func
Résultat System.Threading.Tasks.Task