Kevlar.Extensions.EntityFrameworkCore 1.4.1

There is a newer version of this package available.
See the version list below for details.
dotnet add package Kevlar.Extensions.EntityFrameworkCore --version 1.4.1
                    
NuGet\Install-Package Kevlar.Extensions.EntityFrameworkCore -Version 1.4.1
                    
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="Kevlar.Extensions.EntityFrameworkCore" Version="1.4.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Kevlar.Extensions.EntityFrameworkCore" Version="1.4.1" />
                    
Directory.Packages.props
<PackageReference Include="Kevlar.Extensions.EntityFrameworkCore" />
                    
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 Kevlar.Extensions.EntityFrameworkCore --version 1.4.1
                    
#r "nuget: Kevlar.Extensions.EntityFrameworkCore, 1.4.1"
                    
#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 Kevlar.Extensions.EntityFrameworkCore@1.4.1
                    
#: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=Kevlar.Extensions.EntityFrameworkCore&version=1.4.1
                    
Install as a Cake Addin
#tool nuget:?package=Kevlar.Extensions.EntityFrameworkCore&version=1.4.1
                    
Install as a Cake Tool

Kevlar.Extensions.EntityFrameworkCore

Sequential Kevlar execution strategies for Entity Framework Core on .NET 8 and .NET 10. Requires EF Core 8.0.33 or later on .NET 8, or EF Core 10.0.14 or later on .NET 10, 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 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.5.1 11 11/21/2026
1.5.0 90 11/10/2026
1.4.1 94 11/3/2026
1.4.0 106 10/27/2026
1.3.0 105 9/29/2026
1.2.0 103 9/28/2026