Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API review changes from August 12 #34415

Merged
merged 1 commit into from
Aug 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public virtual SqlEngineDbContextOptionsBuilder EnableRetryOnFailure()
/// for more information and examples.
/// </para>
/// </remarks>
public virtual SqlEngineDbContextOptionsBuilder TryEnableRetryOnFailure()
public virtual SqlEngineDbContextOptionsBuilder EnableRetryOnFailureByDefault()
=> WithOption(e => e.WithUseRetryingStrategyByDefault(true));

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -769,7 +769,7 @@ public void Fallback_execution_strategy_used()
{
using var scope = new ServiceCollection()
.AddDbContext<NorthwindContext>(b => b.UseSqlServer())
.ConfigureDbContext<NorthwindContext>(b => b.ConfigureSqlEngine(o => o.TryEnableRetryOnFailure()))
.ConfigureDbContext<NorthwindContext>(b => b.ConfigureSqlEngine(o => o.EnableRetryOnFailureByDefault()))
.BuildServiceProvider(validateScopes: true)
.CreateScope();

Expand Down Expand Up @@ -799,7 +799,7 @@ public void Fallback_execution_strategy_does_not_overwrite_Add_first()
{
using var scope = new ServiceCollection()
.AddDbContext<NorthwindContext>(b => b.UseSqlServer(o => o.ExecutionStrategy(_ => new DummyExecutionStrategy())))
.ConfigureDbContext<NorthwindContext>(b => b.ConfigureSqlEngine(o => o.TryEnableRetryOnFailure()))
.ConfigureDbContext<NorthwindContext>(b => b.ConfigureSqlEngine(o => o.EnableRetryOnFailureByDefault()))
.BuildServiceProvider(validateScopes: true)
.CreateScope();

Expand All @@ -813,7 +813,7 @@ public void Fallback_execution_strategy_does_not_overwrite_Add_first()
public void Fallback_execution_strategy_does_not_overwrite_Configure_first()
{
using var scope = new ServiceCollection()
.ConfigureDbContext<NorthwindContext>(b => b.ConfigureSqlEngine(o => o.TryEnableRetryOnFailure()))
.ConfigureDbContext<NorthwindContext>(b => b.ConfigureSqlEngine(o => o.EnableRetryOnFailureByDefault()))
.AddDbContext<NorthwindContext>(b => b.UseSqlServer(o => o.ExecutionStrategy(_ => new DummyExecutionStrategy())))
.BuildServiceProvider(validateScopes: true)
.CreateScope();
Expand Down