Kevlar.Extensions.EntityFrameworkCore
1.4.0
See the version list below for details.
dotnet add package Kevlar.Extensions.EntityFrameworkCore --version 1.4.0
NuGet\Install-Package Kevlar.Extensions.EntityFrameworkCore -Version 1.4.0
<PackageReference Include="Kevlar.Extensions.EntityFrameworkCore" Version="1.4.0" />
<PackageVersion Include="Kevlar.Extensions.EntityFrameworkCore" Version="1.4.0" />
<PackageReference Include="Kevlar.Extensions.EntityFrameworkCore" />
paket add Kevlar.Extensions.EntityFrameworkCore --version 1.4.0
#r "nuget: Kevlar.Extensions.EntityFrameworkCore, 1.4.0"
#:package Kevlar.Extensions.EntityFrameworkCore@1.4.0
#addin nuget:?package=Kevlar.Extensions.EntityFrameworkCore&version=1.4.0
#tool nuget:?package=Kevlar.Extensions.EntityFrameworkCore&version=1.4.0
Kevlar.Extensions.EntityFrameworkCore
Sequential Kevlar execution strategies for Entity Framework Core on .NET 8 and .NET 10. Requires EF Core 8.0.31 or later and a separately installed relational provider.
using System.IO;
using Kevlar;
using Microsoft.EntityFrameworkCore;
var shield = Shield.When<IOException>().Retry(2, backoff: Backoff.None);
var options = new DbContextOptionsBuilder()
.UseSqlite("Data Source=:memory:")
.UseKevlarExecutionStrategy(shield);
The example requires Microsoft.EntityFrameworkCore.Sqlite; its IOException predicate is
for simulated failures. SQL Server and Npgsql applications can call UseKevlarExecutionStrategy()
after configuring the provider to use its native transient-error classification and retry delays.
Configure EnableRetryOnFailure first to preserve customized provider retry settings. Automatic
policy discovery requires untrimmed provider assemblies; other providers need an explicit shield.
Use EF Core's CreateExecutionStrategy().ExecuteInTransactionAsync(...) for a transaction with
commit verification. Successful verification prevents duplicate execution. A negative verification
result permits retry when the original failure is retryable; a verification query that exhausts its
retries terminates without replaying the ambiguous write. Caller cancellation flows through operations,
verification, and delays. Explicit shields verify any non-cancellation failure by default when a
verification callback is present; the direct constructor accepts shouldVerifySuccessOn to narrow it.
Each strategy belongs to one DbContext and must not run concurrently. Hedging, timeout strategies,
live-forwarding shields, and custom repetition are rejected. Use database command timeouts and
cancellation instead. Nested EF operations reuse the active scope. Retrying strategies reject
transactions opened outside their execution delegate.
Documentation
contains provider setup, direct KevlarExecutionStrategy registration, and a complete transaction example.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. 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
- Kevlar (= 1.4.0)
- Microsoft.EntityFrameworkCore.Relational (>= 8.0.33)
-
net8.0
- Kevlar (= 1.4.0)
- Microsoft.EntityFrameworkCore.Relational (>= 8.0.33)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.