Class DStoreContext<T>
Generic EF Core Microsoft.EntityFrameworkCore.DbContext.
public class DStoreContext<T> : DbContext where T : IDStoreCtxConfigurator
Type Parameters
T
- Inheritance
-
DStoreContext<T>
- Extension Methods
Remarks
The application specific entity model must be configured using a
IDStoreCtxConfigurator implementation of type T
.
Constructors
DStoreContext(DbContextOptions<DStoreContext<T>>, T, ILogger<DStoreContext<T>>)
Ctor from see cref="DbContextOptions{T}"/> and log
.
public DStoreContext(DbContextOptions<DStoreContext<T>> opt, T ctxCfg, ILogger<DStoreContext<T>> log)
Parameters
opt
DbContextOptions<DStoreContext<T>>ctxCfg
Tlog
ILogger<DStoreContext<T>>
Methods
OnConfiguring(DbContextOptionsBuilder)
protected override void OnConfiguring(DbContextOptionsBuilder optBuilder)
Parameters
optBuilder
DbContextOptionsBuilder
OnModelCreating(ModelBuilder)
protected override void OnModelCreating(ModelBuilder modelBuilder)
Parameters
modelBuilder
ModelBuilder