DKNet.EfCore.* is the Infrastructure Layer of the DKNet framework: EF Core building blocks for
entities, persistence, and the SaveChanges pipeline, built for Domain-Driven Design and Onion
Architecture. Each package below is independent and opt-in — pull in only what a given
DbContext needs.
Entity, AuditedEntity), domain-event contracts (IEventEntity), and the attributes
([AuditLog], [SensitiveData], [RaisesEvent], [Sequence], …) that every other package
in this list reads. Start here.SnapshotContext shared by the hook-based packages below.IRepositorySpec, including the Dynamic Predicate Builder. The current, supported way to
query and persist through a DbContext.DKNet.EfCore.Repos
and DKNet.EfCore.Repos.Abstractions were removed; this is the call-site mapping for consumers
still upgrading off them onto Specifications.IBeforeSaveHookAsync/IAfterSaveHookAsync) that Events, AuditLogs, and
DataAuthorization all register against.AddEvent) as part of that pipeline.[SensitiveData]-aware redaction.DbContext helpers (table existence/creation, table name resolution).Every row is the package’s own ProjectReference set in src/EfCore/ — nothing else in the family is pulled in
implicitly.
| Package | Depends on (inside DKNet) | Attaches to your DbContext via |
|---|---|---|
DKNet.EfCore.Abstractions |
nothing | base classes you derive from |
DKNet.EfCore.Extensions |
DKNet.Fw.Extensions, Abstractions |
UseAutoConfigModel<TContext>() |
DKNet.EfCore.Hooks |
DKNet.Fw.Extensions, Extensions |
AddDbContextWithHook<TDbContext>() |
DKNet.EfCore.Specifications |
Extensions |
AddSpecRepo<TDbContext>() |
DKNet.EfCore.Events |
Abstractions, Hooks |
a hook, plus AddEventPublisher<TDbContext, TImpl>() |
DKNet.EfCore.AuditLogs |
Abstractions, Hooks |
a hook, plus AddEfCoreAuditLogs<TDbContext, TPublisher>() |
DKNet.EfCore.DataAuthorization |
Extensions, Hooks |
a global query filter and a hook, via AddDataOwnerProvider<TDbContext, TProvider>() |
DKNet.EfCore.Encryption |
nothing | a ValueConverter, via AddEfCoreEncryption<TKeyProvider>() |
DKNet.EfCore.DtoGenerator |
nothing | compile time only — nothing is registered |
DKNet.EfCore.Relational.Helpers |
nothing | plain DbContext extension methods |
Two consequences worth remembering:
Events, AuditLogs, and DataAuthorization all need the hook pipeline. Register the context with
AddDbContextWithHook<TDbContext>(), not AddDbContext, or their hooks never run.Encryption, DtoGenerator, and Relational.Helpers are independent. They work on a DbContext that uses
none of the rest of this family.The same picture across the whole suite, plus a request and a domain event traced end to end, is in the Architecture Guide.