DbContextHelpers DbContextHelpers Class

Syntax

Declaration

public static class DbContextHelpersPublic Module DbContextHelpers

Inheritance Hierarchy

  • System.Object
    System.Object
  • DbContextHelpers
    DbContextHelpers

Inherited Members

ToString(),
ToString(),
Equals(Object),
Equals(Object),
Equals(Object, Object),
Equals(Object, Object),
ReferenceEquals(Object, Object),
ReferenceEquals(Object, Object),
GetHashCode(),
GetHashCode(),
GetType(),
GetType(),
MemberwiseClone()
MemberwiseClone()

Methods summary

Methods

  • ExecuteWithStrategyInTransaction<TContext>(Func<TContext>, Action<DatabaseFacade, IDbContextTransaction>, Action<TContext>, Action<TContext>, Action<TContext>, Action<TContext>)
    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 : DbContextPublic 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)

    Parameters

    • createContext
      System.Func<TResult><TContext>
      System.Func<TResult>(Of TContext)
    • useTransaction
      System.Action<T1, T2><DatabaseFacade, IDbContextTransaction>
      System.Action<T1, T2>(Of DatabaseFacade, IDbContextTransaction)
    • testOperation
      System.Action<T><TContext>
      System.Action<T>(Of TContext)
    • nestedTestOperation1
      System.Action<T><TContext>
      System.Action<T>(Of TContext)
    • nestedTestOperation2
      System.Action<T><TContext>
      System.Action<T>(Of TContext)
    • nestedTestOperation3
      System.Action<T><TContext>
      System.Action<T>(Of TContext)
  • ExecuteWithStrategyInTransactionAsync<TContext>(Func<TContext>, Action<DatabaseFacade, IDbContextTransaction>, Func<TContext, Task>, Func<TContext, Task>, Func<TContext, Task>, Func<TContext, Task>)
    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 : DbContextPublic 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

    Parameters

    • createContext
      System.Func<TResult><TContext>
      System.Func<TResult>(Of TContext)
    • useTransaction
      System.Action<T1, T2><DatabaseFacade, IDbContextTransaction>
      System.Action<T1, T2>(Of DatabaseFacade, IDbContextTransaction)
    • testOperation
      System.Func<T, TResult><TContext, System.Threading.Tasks.Task>
      System.Func<T, TResult>(Of TContext, System.Threading.Tasks.Task)
    • nestedTestOperation1
      System.Func<T, TResult><TContext, System.Threading.Tasks.Task>
      System.Func<T, TResult>(Of TContext, System.Threading.Tasks.Task)
    • nestedTestOperation2
      System.Func<T, TResult><TContext, System.Threading.Tasks.Task>
      System.Func<T, TResult>(Of TContext, System.Threading.Tasks.Task)
    • nestedTestOperation3
      System.Func<T, TResult><TContext, System.Threading.Tasks.Task>
      System.Func<T, TResult>(Of TContext, System.Threading.Tasks.Task)

    Returns

    • System.Threading.Tasks.Task
      System.Threading.Tasks.Task

Details

Assembly

Microsoft.EntityFrameworkCore.Specification.Tests.dll