Skip to content

Commit e9aee79

Browse files
committed
feat: enable retry on failure for SQL Server connection in DependencyInjection
1 parent 73c8a78 commit e9aee79

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Source/Ecommerce.Infrastructure/DependencyInjection.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,11 @@ IConfigurationManager configuration
100100
.UseSqlServer(
101101
configuration[
102102
$"{DatabaseOptions.SectionName}:{SqlServerOptions.SectionName}:ConnectionString"
103-
]
103+
],
104+
sqlOptions =>
105+
{
106+
sqlOptions.EnableRetryOnFailure();
107+
}
104108
)
105109
.AddInterceptors(sp.GetRequiredService<PublishDomainEventsInterceptor>())
106110
.EnableDetailedErrors(true);

0 commit comments

Comments
 (0)