diff --git a/src/EFCore.SqlServer/Infrastructure/Internal/SqlServerOptionsExtension.cs b/src/EFCore.SqlServer/Infrastructure/Internal/SqlServerOptionsExtension.cs index 3419cc2eb5f..31d6162d857 100644 --- a/src/EFCore.SqlServer/Infrastructure/Internal/SqlServerOptionsExtension.cs +++ b/src/EFCore.SqlServer/Infrastructure/Internal/SqlServerOptionsExtension.cs @@ -19,7 +19,7 @@ public class SqlServerOptionsExtension : RelationalOptionsExtension, IDbContextO private int? _sqlServerCompatibilityLevel; private int? _azureSqlCompatibilityLevel; private int? _azureSynapseCompatibilityLevel; - private bool _useRetryStrategyByDefault; + private bool _useRetryingStrategyByDefault; /// /// This is an internal API that supports the Entity Framework Core infrastructure and not subject to @@ -83,7 +83,7 @@ protected SqlServerOptionsExtension(SqlServerOptionsExtension copyFrom) _sqlServerCompatibilityLevel = copyFrom._sqlServerCompatibilityLevel; _azureSqlCompatibilityLevel = copyFrom._azureSqlCompatibilityLevel; _azureSynapseCompatibilityLevel = copyFrom._azureSynapseCompatibilityLevel; - _useRetryStrategyByDefault = copyFrom._useRetryStrategyByDefault; + _useRetryingStrategyByDefault = copyFrom._useRetryingStrategyByDefault; } /// @@ -146,8 +146,8 @@ public virtual int AzureSynapseCompatibilityLevel /// any release. You should only use it directly in your code with extreme caution and knowing that /// doing so can result in application failures when updating to a new Entity Framework Core release. /// - public virtual bool UseRetryStrategyByDefault - => _useRetryStrategyByDefault; + public virtual bool UseRetryingStrategyByDefault + => _useRetryingStrategyByDefault; /// /// This is an internal API that supports the Entity Framework Core infrastructure and not subject to @@ -180,7 +180,7 @@ public virtual SqlServerOptionsExtension WithLegacyAzureSql(bool enable) var clone = (SqlServerOptionsExtension)Clone(); clone._engineType = SqlServerEngineType.SqlServer; - clone._useRetryStrategyByDefault = enable; + clone._useRetryingStrategyByDefault = enable; return clone; } @@ -236,11 +236,11 @@ public virtual SqlServerOptionsExtension WithAzureSynapseCompatibilityLevel(int? /// any release. You should only use it directly in your code with extreme caution and knowing that /// doing so can result in application failures when updating to a new Entity Framework Core release. /// - public virtual SqlServerOptionsExtension WithUseRetryStrategyByDefault(bool enable) + public virtual SqlServerOptionsExtension WithUseRetryingStrategyByDefault(bool enable) { var clone = (SqlServerOptionsExtension)Clone(); - clone._useRetryStrategyByDefault = enable; + clone._useRetryingStrategyByDefault = enable; return clone; } @@ -251,7 +251,7 @@ public virtual IDbContextOptionsExtension ApplyDefaults(IDbContextOptions option if (ExecutionStrategyFactory == null && (EngineType == SqlServerEngineType.AzureSql || EngineType == SqlServerEngineType.AzureSynapse - || UseRetryStrategyByDefault)) + || UseRetryingStrategyByDefault)) { return WithExecutionStrategyFactory(c => new SqlServerRetryingExecutionStrategy(c)); } @@ -325,11 +325,11 @@ public override string LogFragment .Append(Extension._engineType) .Append(' '); - if (Extension._useRetryStrategyByDefault) + if (Extension._useRetryingStrategyByDefault) { builder - .Append("UseRetryStrategyByDefault=") - .Append(Extension._useRetryStrategyByDefault) + .Append("UseRetryingStrategyByDefault=") + .Append(Extension._useRetryingStrategyByDefault) .Append(' '); } @@ -365,7 +365,7 @@ public override string LogFragment public override void PopulateDebugInfo(IDictionary debugInfo) { debugInfo["EngineType"] = Extension.EngineType.ToString(); - debugInfo["UseRetryStrategyByDefault"] = Extension.UseRetryStrategyByDefault.ToString(); + debugInfo["UseRetryingStrategyByDefault"] = Extension.UseRetryingStrategyByDefault.ToString(); if (Extension.SqlServerCompatibilityLevel is int sqlServerCompatibilityLevel) { diff --git a/src/EFCore.SqlServer/Infrastructure/SqlEngineDbContextOptionsBuilder.cs b/src/EFCore.SqlServer/Infrastructure/SqlEngineDbContextOptionsBuilder.cs index 6c2ea214861..b08b3ac26a2 100644 --- a/src/EFCore.SqlServer/Infrastructure/SqlEngineDbContextOptionsBuilder.cs +++ b/src/EFCore.SqlServer/Infrastructure/SqlEngineDbContextOptionsBuilder.cs @@ -61,7 +61,7 @@ public virtual SqlEngineDbContextOptionsBuilder EnableRetryOnFailure() /// /// public virtual SqlEngineDbContextOptionsBuilder TryEnableRetryOnFailure() - => WithOption(e => e.WithUseRetryStrategyByDefault(true)); + => WithOption(e => e.WithUseRetryingStrategyByDefault(true)); /// /// Configures the context to use the default retrying .