Kck.Persistence.Abstractions 3.4.0

dotnet add package Kck.Persistence.Abstractions --version 3.4.0
                    
NuGet\Install-Package Kck.Persistence.Abstractions -Version 3.4.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="Kck.Persistence.Abstractions" Version="3.4.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Kck.Persistence.Abstractions" Version="3.4.0" />
                    
Directory.Packages.props
<PackageReference Include="Kck.Persistence.Abstractions" />
                    
Project file
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 Kck.Persistence.Abstractions --version 3.4.0
                    
#r "nuget: Kck.Persistence.Abstractions, 3.4.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 Kck.Persistence.Abstractions@3.4.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=Kck.Persistence.Abstractions&version=3.4.0
                    
Install as a Cake Addin
#tool nuget:?package=Kck.Persistence.Abstractions&version=3.4.0
                    
Install as a Cake Tool

Kck.Persistence.Abstractions

Repository and Unit-of-Work persistence abstractions following the Specification pattern — IReadRepository<T,TId>, IWriteRepository<T,TId>, dynamic filtering, and IUnitOfWork.

Installation

dotnet add package Kck.Persistence.Abstractions

Quick Start

// Program.cs — register the Entity Framework provider
builder.Services.AddKckEntityFramework<AppDbContext>(builder.Configuration);

// Use repositories in handlers
public class GetOrderHandler(IReadRepository<Order, Guid> orders)
{
    public async Task<Order?> HandleAsync(Guid orderId, CancellationToken ct)
        => await orders.GetByIdAsync(orderId, ct);
}

public class CreateOrderHandler(
    IWriteRepository<Order, Guid> orders, IUnitOfWork uow)
{
    public async Task<Order> HandleAsync(CreateOrderCommand cmd, CancellationToken ct)
    {
        var order = Order.Create(cmd.CustomerName, cmd.Total);
        await orders.AddAsync(order, ct);
        await uow.SaveChangesAsync(ct);
        return order;
    }
}

// Dynamic query with QueryOptions
var activeOrders = await orders.ListAsync(
    new QueryOptions<Order>
    {
        Filter       = o => o.Status == OrderStatus.Active,
        OrderBy      = q => q.OrderByDescending(o => o.CreatedAt),
        AsTracking   = false
    }, ct);

Configuration

Property Description Default
Persistence:ConnectionString Database connection string
Persistence:CommandTimeout EF command timeout (seconds) 30
Persistence:EnableSensitiveDataLogging Log parameter values false

Resources

Product 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.

NuGet packages (4)

Showing the top 4 NuGet packages that depend on Kck.Persistence.Abstractions:

Package Downloads
Kck.Bundle.WebApi

Opinionated ASP.NET Core WebAPI starter pack. Registers Serilog, in-memory caching, JWT auth, Argon2 hashing, InMemory event bus, OpenTelemetry, rate limiting, security headers, CORS, and global exception handling in a single AddKckWebApiDefaults() call.

Kck.Persistence.EntityFramework

Entity Framework Core implementations of IReadRepository<T,TId>, IWriteRepository<T,TId>, and IUnitOfWork. Includes AuditInterceptor (auto CreatedDate/ModifiedDate), DynamicFilterExtensions, soft-delete support, and ToPaginateAsync extension. Registered via AddKckEntityFramework<TContext>().

Kck.Pipeline.MediatR

MediatR-backed pipeline behaviors for Kck. Provides Authorization, Caching, Logging, Transaction, and Validation behaviors. DEPRECATED — use Kck.Pipeline.Mediator instead. Will be removed in a future version (KCK0200).

Kck.Pipeline.Mediator

Mediator.Abstractions 3.x-backed pipeline behaviors for Kck. Provides Authorization, Caching, Logging, Transaction, and Validation cross-cutting behaviors. The recommended pipeline provider since Kck v2. Registered via AddKckMediator().

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
3.4.0 132 5/17/2026
3.3.0 134 5/17/2026
3.2.0 130 5/17/2026
3.1.0 132 5/17/2026
3.0.0 133 5/17/2026
2.0.0 131 5/7/2026