Skip to content

Commit 45baf92

Browse files
authored
Document EnableRetryOnFailureByDefault (from #4899). (#4997)
1 parent 373af6d commit 45baf92

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

  • entity-framework/core/providers/sql-server

entity-framework/core/providers/sql-server/index.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,10 @@ Starting with EF 9, it's recommended to use `UseAzureSql` and `UseAzureSynapse`
4343
> [!NOTE]
4444
> UseAzureSql and UseAzureSynapse methods were introduced in EF Core 9.0.
4545
46+
### EnableRetryOnFailureByDefault
47+
48+
EF 9 introduced `EnableRetryOnFailureByDefault` method that configures the context to default [execution strategy](xref:core/miscellaneous/connection-resiliency) unless it is configured explicitly (i.e. when using DI). To use it, simply call `ConfigureSqlEngine(c => c.EnableRetryOnFailureByDefault())` and later you can use `UseSqlServer` or `UseAzureSql` or `UseAzureSynapse` as usual.
49+
4650
## Supported Database Engines
4751

4852
* Microsoft SQL Server (2012 onwards)

0 commit comments

Comments
 (0)