DbContextHelpers DbContextHelpers Class

Definition

public static class DbContextHelpers
Public Module DbContextHelpers
Inheritance
System.ObjectSystem.Object
DbContextHelpersDbContextHelpers

Methods

Equals(Object) Equals(Object)

Inherited from System.Object

Equals(Object, Object) Equals(Object, Object)

Inherited from System.Object

ExecuteWithStrategyInTransaction(Func, Action, Action, Action, Action, Action) ExecuteWithStrategyInTransaction(Of TContext)(Func(Of TContext), Action(Of DatabaseFacade, IDbContextTransaction), Action(Of TContext), Action(Of TContext), Action(Of TContext), Action(Of TContext))

public static void ExecuteWithStrategyInTransaction<TContext>(Func<TContext> createContext, Action<DatabaseFacade, IDbContextTransaction> useTransaction, Action<TContext> testOperation, Action<TContext> nestedTestOperation1 = null, Action<TContext> nestedTestOperation2 = null, Action<TContext> nestedTestOperation3 = null)where TContext : DbContext
Public Shared Sub ExecuteWithStrategyInTransaction(Of TContext As DbContext)(createContext As Func(Of TContext), useTransaction As Action(Of DatabaseFacade, IDbContextTransaction), testOperation As Action(Of TContext), nestedTestOperation1 As Action(Of TContext) = Nothing, nestedTestOperation2 As Action(Of TContext) = Nothing, nestedTestOperation3 As Action(Of TContext) = Nothing)
Type Parameters
TContext
Parameters
createContext
System.Func<TContext> System.Func(Of TContext)
useTransaction
System.Action<DatabaseFacade, IDbContextTransaction> System.Action(Of DatabaseFacade, IDbContextTransaction)
testOperation
System.Action<TContext> System.Action(Of TContext)
nestedTestOperation1
System.Action<TContext> System.Action(Of TContext)
nestedTestOperation2
System.Action<TContext> System.Action(Of TContext)
nestedTestOperation3
System.Action<TContext> System.Action(Of TContext)

ExecuteWithStrategyInTransactionAsync(Func, Action, Func, Func, Func, Func) ExecuteWithStrategyInTransactionAsync(Of TContext)(Func(Of TContext), Action(Of DatabaseFacade, IDbContextTransaction), Func(Of TContext, Task), Func(Of TContext, Task), Func(Of TContext, Task), Func(Of TContext, Task))

public static Task ExecuteWithStrategyInTransactionAsync<TContext>(Func<TContext> createContext, Action<DatabaseFacade, IDbContextTransaction> useTransaction, Func<TContext, Task> testOperation, Func<TContext, Task> nestedTestOperation1 = null, Func<TContext, Task> nestedTestOperation2 = null, Func<TContext, Task> nestedTestOperation3 = null)where TContext : DbContext
Public Shared Function ExecuteWithStrategyInTransactionAsync(Of TContext As DbContext)(createContext As Func(Of TContext), useTransaction As Action(Of DatabaseFacade, IDbContextTransaction), testOperation As Func(Of TContext, Task), nestedTestOperation1 As Func(Of TContext, Task) = Nothing, nestedTestOperation2 As Func(Of TContext, Task) = Nothing, nestedTestOperation3 As Func(Of TContext, Task) = Nothing) As Task
Type Parameters
TContext
Parameters
createContext
System.Func<TContext> System.Func(Of TContext)
useTransaction
System.Action<DatabaseFacade, IDbContextTransaction> System.Action(Of DatabaseFacade, IDbContextTransaction)
testOperation
System.Func<TContext, System.Threading.Tasks.Task> System.Func(Of TContext, System.Threading.Tasks.Task)
nestedTestOperation1
System.Func<TContext, System.Threading.Tasks.Task> System.Func(Of TContext, System.Threading.Tasks.Task)
nestedTestOperation2
System.Func<TContext, System.Threading.Tasks.Task> System.Func(Of TContext, System.Threading.Tasks.Task)
nestedTestOperation3
System.Func<TContext, System.Threading.Tasks.Task> System.Func(Of TContext, System.Threading.Tasks.Task)
Returns
System.Threading.Tasks.Task System.Threading.Tasks.Task

GetHashCode() GetHashCode()

Inherited from System.Object

GetType() GetType()

Inherited from System.Object

MemberwiseClone() MemberwiseClone()

Inherited from System.Object

ReferenceEquals(Object, Object) ReferenceEquals(Object, Object)

Inherited from System.Object

ToString() ToString()

Inherited from System.Object