Devkumi.SharedKernel.Persistence
1.0.0
dotnet add package Devkumi.SharedKernel.Persistence --version 1.0.0
NuGet\Install-Package Devkumi.SharedKernel.Persistence -Version 1.0.0
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Devkumi.SharedKernel.Persistence" Version="1.0.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Devkumi.SharedKernel.Persistence" Version="1.0.0" />
<PackageReference Include="Devkumi.SharedKernel.Persistence" />
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Devkumi.SharedKernel.Persistence --version 1.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Devkumi.SharedKernel.Persistence, 1.0.0"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Devkumi.SharedKernel.Persistence@1.0.0
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Devkumi.SharedKernel.Persistence&version=1.0.0
#tool nuget:?package=Devkumi.SharedKernel.Persistence&version=1.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Devkumi.SharedKernel.Persistence
EF Core 10 + PostgreSQL persistence base for Clean Architecture / DDD projects targeting .NET 10.
What's included
| Type | Description |
|---|---|
AuditableContext<T> |
Abstract DbContext that auto-stamps CreatedUserId, CreatedAtUtc, LastModifiedUserId, LastModifiedAtUtc on every save |
OutboxMessage |
Entity that stores serialised domain events for reliable async dispatch |
ConvertDomainEventsToOutboxMessagesInterceptor |
EF Core SaveChangesInterceptor that converts aggregate domain events into OutboxMessage rows atomically |
UnitOfWork<T> |
IUnitOfWork implementation wrapping DbContext.SaveChangesAsync |
ISpecification<T> / HeroSpecification<T> |
Specification pattern with criteria, includes, and ordering |
QueryableExtensions |
.Specify<T>() and .ToPaginatedListAsync() helpers |
AddDatabaseConfiguration<T>() |
Registers the DbContext with Npgsql + snake_case naming + OutBox interceptor |
AddUnitOfWork<T>() |
Registers IUnitOfWork scoped to a specific DbContext |
Installation
dotnet add package Devkumi.SharedKernel.Persistence --version 1.0.0
Usage
// In your module's DI
services.AddDatabaseConfiguration<MyDbContext>(configuration);
services.AddUnitOfWork<MyDbContext>();
// Your DbContext
public sealed class MyDbContext(DbContextOptions<MyDbContext> options, ICurrentUserService currentUser)
: AuditableContext<MyDbContext>(options, currentUser)
{
protected override void OnModelCreating(ModelBuilder modelBuilder)
{
base.OnModelCreating(modelBuilder);
modelBuilder.HasDefaultSchema("myschema");
modelBuilder.ApplyConfigurationsFromAssembly(typeof(MyDbContext).Assembly);
}
}
Connection string
Set CONNECTION_STRING as an environment variable or in appsettings.json.
Dependencies
- Devkumi.SharedKernel.Application
- EF Core 10.x
- Npgsql.EntityFrameworkCore.PostgreSQL 10.x
- EFCore.NamingConventions 10.x
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net10.0
- Devkumi.SharedKernel.Application (>= 1.0.0)
- EFCore.NamingConventions (>= 10.0.1)
- Microsoft.EntityFrameworkCore (>= 10.0.7)
- Microsoft.EntityFrameworkCore.Relational (>= 10.0.7)
- Newtonsoft.Json (>= 13.0.3)
- Npgsql.EntityFrameworkCore.PostgreSQL (>= 10.0.2)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Devkumi.SharedKernel.Persistence:
| Package | Downloads |
|---|---|
|
Devkumi.SharedKernel.Infrastructure
Infrastructure services: JWT authentication, CurrentUserService, Hangfire outbox job processor, Redis cache, Polly resilience. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.0.0 | 147 | 6/17/2026 |