DKNet.AspCore.Idempotency
10.1.10
dotnet add package DKNet.AspCore.Idempotency --version 10.1.10
NuGet\Install-Package DKNet.AspCore.Idempotency -Version 10.1.10
<PackageReference Include="DKNet.AspCore.Idempotency" Version="10.1.10" />
<PackageVersion Include="DKNet.AspCore.Idempotency" Version="10.1.10" />
<PackageReference Include="DKNet.AspCore.Idempotency" />
paket add DKNet.AspCore.Idempotency --version 10.1.10
#r "nuget: DKNet.AspCore.Idempotency, 10.1.10"
#:package DKNet.AspCore.Idempotency@10.1.10
#addin nuget:?package=DKNet.AspCore.Idempotency&version=10.1.10
#tool nuget:?package=DKNet.AspCore.Idempotency&version=10.1.10
DKNet.AspCore.Idempotency
An ASP.NET Core minimal-API endpoint filter that makes mutating endpoints safe to retry: requests carrying the same
idempotency key are processed once, with duplicates either rejected with 409 Conflict or replayed from cache.
Features
- Endpoint filter (
RequiredIdempotentKey()) that enforces an idempotency key on any minimal API route - Composite key validation (presence, length, format) with automatic
400 Bad Requestresponses - Two duplicate-request strategies:
409 Conflict(default) or transparent cached-response replay - Caller scope isolation (authenticated user, HMAC'd
Authorizationheader, or client IP) so the same key from different callers never collides — or supply your own resolver - Pluggable storage via
IIdempotencyKeyStore, with a built-inIDistributedCache-backed store out of the box - Configurable which HTTP status codes get cached, cache key prefix, and result expiration
Installation
dotnet add package DKNet.AspCore.Idempotency
Quick Start
using DKNet.AspCore.Idempotency;
using DKNet.AspCore.Idempotency.Filtering;
using DKNet.AspCore.Idempotency.Store;
var builder = WebApplication.CreateBuilder(args);
builder.Services.AddDistributedMemoryCache();
builder.Services.AddIdempotentKey<IdempotencyDistributedCacheStore>();
var app = builder.Build();
app.MapPost("/orders", CreateOrder)
.RequiredIdempotentKey();
await app.RunAsync();
Clients call POST /orders with an X-Idempotency-Key header; a retried request with the same key never
re-executes CreateOrder.
For multi-instance production traffic, swap the built-in store for an atomic one from the ecosystem —
DKNet.AspCore.Idempotency.MsSqlStore, DKNet.AspCore.Idempotency.NpgsqlStore, or
DKNet.AspCore.Idempotency.RedisStore.
Migration — namespace changes in this release
Root types were grouped into concern folders; the namespace of each moved type now ends
with its folder name. This is an import-only source break: no type was renamed, removed,
resignatured, or had its behaviour changed — update the using line and you're done.
| Type | Old namespace | New namespace |
|---|---|---|
IdempotencyEndpointFilter (incl. RequiredIdempotentKey()), IdempotencyKeyScopeResolver, IdempotentKeyInfo |
DKNet.AspCore.Idempotency |
DKNet.AspCore.Idempotency.Filtering |
CachedResponse |
DKNet.AspCore.Idempotency |
DKNet.AspCore.Idempotency.Store (joins the existing IIdempotencyKeyStore/IdempotencyDistributedCacheStore) |
IdempotencySetup (registration point) and IdempotencyOptions/IdempotentConflictHandling
(the configuration surface) stay at DKNet.AspCore.Idempotency.
Documentation
Full feature guide, configuration reference, and store comparison: https://github.com/baoduy/DKNet/blob/main/docs/AspNetCore/DKNet.AspCore.Idempotency.md
License
This project is licensed under the MIT License - see the LICENSE file for details.
About
Developed by Steven Hoang.
| 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. |
-
net10.0
- DKNet.Fw.Extensions (>= 10.1.10)
- FluentResults (>= 4.0.0)
NuGet packages (4)
Showing the top 4 NuGet packages that depend on DKNet.AspCore.Idempotency:
| Package | Downloads |
|---|---|
|
DKNet.AspCore.Idempotency.MsSqlStore
DKNet is an enterprise-grade .NET library collection focused on advanced EF Core extensions, dynamic predicate building, and the Specification pattern. It provides production-ready tools for building robust, type-safe, and testable data access layers, including dynamic LINQ support, LinqKit integration. Designed for modern cloud-native applications, DKNet enforces strict code quality, async best practices, and full documentation for all public APIs. Enterprise-grade .NET library suite for modern application development, featuring advanced EF Core extensions (dynamic predicates, specifications, LinqKit), robust Domain-Driven Design (DDD) patterns, and domain event support. DKNet empowers scalable, maintainable, and testable solutions with type-safe validation, async/await, XML documentation, and high code quality standards. Ideal for cloud-native, microservices, and enterprise architectures. |
|
|
DKNet.AspCore.Idempotency.NpgsqlStore
DKNet is an enterprise-grade .NET library collection focused on advanced EF Core extensions, dynamic predicate building, and the Specification pattern. It provides production-ready tools for building robust, type-safe, and testable data access layers, including dynamic LINQ support, LinqKit integration. Designed for modern cloud-native applications, DKNet enforces strict code quality, async best practices, and full documentation for all public APIs. Enterprise-grade .NET library suite for modern application development, featuring advanced EF Core extensions (dynamic predicates, specifications, LinqKit), robust Domain-Driven Design (DDD) patterns, and domain event support. DKNet empowers scalable, maintainable, and testable solutions with type-safe validation, async/await, XML documentation, and high code quality standards. Ideal for cloud-native, microservices, and enterprise architectures. |
|
|
DKNet.AspCore.Idempotency.RedisStore
DKNet is an enterprise-grade .NET library collection focused on advanced EF Core extensions, dynamic predicate building, and the Specification pattern. It provides production-ready tools for building robust, type-safe, and testable data access layers, including dynamic LINQ support, LinqKit integration. Designed for modern cloud-native applications, DKNet enforces strict code quality, async best practices, and full documentation for all public APIs. Enterprise-grade .NET library suite for modern application development, featuring advanced EF Core extensions (dynamic predicates, specifications, LinqKit), robust Domain-Driven Design (DDD) patterns, and domain event support. DKNet empowers scalable, maintainable, and testable solutions with type-safe validation, async/await, XML documentation, and high code quality standards. Ideal for cloud-native, microservices, and enterprise architectures. |
|
|
DKNet.AspCore.Idempotency.Relational
DKNet is an enterprise-grade .NET library collection focused on advanced EF Core extensions, dynamic predicate building, and the Specification pattern. It provides production-ready tools for building robust, type-safe, and testable data access layers, including dynamic LINQ support, LinqKit integration. Designed for modern cloud-native applications, DKNet enforces strict code quality, async best practices, and full documentation for all public APIs. Enterprise-grade .NET library suite for modern application development, featuring advanced EF Core extensions (dynamic predicates, specifications, LinqKit), robust Domain-Driven Design (DDD) patterns, and domain event support. DKNet empowers scalable, maintainable, and testable solutions with type-safe validation, async/await, XML documentation, and high code quality standards. Ideal for cloud-native, microservices, and enterprise architectures. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 10.1.10 | 35 | 8/22/2026 |
| 10.1.9 | 59 | 8/22/2026 |
| 10.1.8 | 48 | 8/21/2026 |
| 10.1.7 | 93 | 8/21/2026 |
| 10.1.6 | 76 | 8/21/2026 |
| 10.1.5 | 84 | 8/20/2026 |
| 10.1.4 | 95 | 8/20/2026 |
| 10.1.3 | 91 | 8/19/2026 |
| 10.1.2 | 96 | 8/19/2026 |
| 10.1.1 | 91 | 8/19/2026 |
| 10.0.36 | 108 | 8/18/2026 |
| 10.0.35 | 115 | 8/5/2026 |
| 10.0.34 | 112 | 8/5/2026 |
| 10.0.33 | 115 | 8/4/2026 |
| 10.0.32 | 112 | 8/3/2026 |
| 10.0.31 | 108 | 7/21/2026 |
| 10.0.30 | 113 | 7/21/2026 |
| 10.0.29 | 136 | 6/22/2026 |
| 10.0.27 | 135 | 5/22/2026 |
| 10.0.26 | 123 | 5/19/2026 |