ef-core-azure-sql
EF Core against Azure SQL Database
This is the Azure SQL Database delta on top of EF Core, not an EF Core tutorial. Modelling, LINQ,
change tracking and Include work the same everywhere and are not repeated here.
Command output and compiler results below were captured 2026-09-03 on
Microsoft.EntityFrameworkCore.SqlServer 9.0.19 with dotnet ef 9.0.19 on .NET SDK 8.0.421.
Runtime behaviour was measured 2026-08-27 against a live engine reporting EngineEdition 5.
EF Core 10 is the supported long term release and EF Core 9 is still serviced.
Open references/retry-transactions-and-type-mapping.md when a
number below disagrees with what you are seeing, or before reproducing a run.
The correction
Retry is not a setting on this database. It is on in every current answer: EnableRetryOnFailure
in the older corpus shape, UseAzureSql in the newer one. Both produce
SqlServerRetryingExecutionStrategy, and turning it on silently redefines what a transaction
is. The visible half is an exception, and it is not the problem. The problem is what an agent
writes next, because the exception dictates its own remedy and the remedy is incomplete: