Interface IDbContextFactory<TDbContext>
Namespace: Accelergreat.EntityFramework
Assembly: Accelergreat.EntityFramework.dll
Syntax
public interface IDbContextFactory<out TDbContext> : IDbContextFactoryEvents<TDbContext> where TDbContext : DbContext
Type Parameters
Name | Description |
---|---|
TDbContext |
Methods
ChangeContextType<TDbContext2>()
Declaration
IDbContextFactory<TDbContext2> ChangeContextType<TDbContext2>()
where TDbContext2 : DbContext
Returns
Type | Description |
---|---|
IDbContextFactory<TDbContext2> |
Type Parameters
Name | Description |
---|---|
TDbContext2 |
NewDbContext()
Creates a new TDbContext
.
The caller is responsible for disposing the context.
Declaration
TDbContext NewDbContext()
Returns
Type | Description |
---|---|
TDbContext |
NewDbContext(Boolean)
Creates a new TDbContext
.
The caller is responsible for disposing the context.
Declaration
TDbContext NewDbContext(bool useTransactionOverriding)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | useTransactionOverriding | Will only be used if the reset strategy is set to transactions in the accelergreat.json configuration file. If set to true, Accelergreat will intercept Microsoft.EntityFrameworkCore.Infrastructure.DatabaseFacade.BeginTransaction |
Returns
Type | Description |
---|---|
TDbContext |