File tree Expand file tree Collapse file tree
src/Services/Catalog/Catalog.API Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -79,6 +79,17 @@ public IServiceProvider ConfigureServices(IServiceCollection services)
7979 //Check Client vs. Server evaluation: https://docs.microsoft.com/en-us/ef/core/querying/client-eval
8080 } ) ;
8181
82+ services . AddDbContext < IntegrationEventLogContext > ( options =>
83+ {
84+ options . UseSqlServer ( Configuration [ "ConnectionString" ] ,
85+ sqlServerOptionsAction : sqlOptions =>
86+ {
87+ sqlOptions . MigrationsAssembly ( typeof ( Startup ) . GetTypeInfo ( ) . Assembly . GetName ( ) . Name ) ;
88+ //Configuring Connection Resiliency: https://docs.microsoft.com/en-us/ef/core/miscellaneous/connection-resiliency
89+ sqlOptions . EnableRetryOnFailure ( maxRetryCount : 10 , maxRetryDelay : TimeSpan . FromSeconds ( 30 ) , errorNumbersToAdd : null ) ;
90+ } ) ;
91+ } ) ;
92+
8293 services . Configure < CatalogSettings > ( Configuration ) ;
8394
8495 // Add framework services.
You can’t perform that action at this time.
0 commit comments