Class DbContextFactory<TContext>
Represents a base implementation of the IDbContextFactory interface.
public abstract class DbContextFactory<TContext> : IDbContextFactory<TContext> where TContext : DbContext
Type Parameters
TContext
The type of the database context.
- Inheritance
-
DbContextFactory<TContext>
- Implements
-
IDbContextFactory<TContext>
Methods
- CreateDbContext()
Creates a new instance of the database context.
- CreateDbContextAsync(CancellationToken)
Asynchronously creates a new instance of the database context.
- CreateDbContextWithNoSensitiveDataLogging()
Creates a new instance of the database context with no sensitive data logging.