Browse Source

Fix for regression bug at AddDbContext<IntegrationEventLogContext> for Catalog.API

pull/368/head
Cesar De la Torre 7 years ago
parent
commit
121a92c557
1 changed files with 11 additions and 0 deletions
  1. +11
    -0
      src/Services/Catalog/Catalog.API/Startup.cs

+ 11
- 0
src/Services/Catalog/Catalog.API/Startup.cs View File

@ -79,6 +79,17 @@
//Check Client vs. Server evaluation: https://docs.microsoft.com/en-us/ef/core/querying/client-eval
});
services.AddDbContext<IntegrationEventLogContext>(options =>
{
options.UseSqlServer(Configuration["ConnectionString"],
sqlServerOptionsAction: sqlOptions =>
{
sqlOptions.MigrationsAssembly(typeof(Startup).GetTypeInfo().Assembly.GetName().Name);
//Configuring Connection Resiliency: https://docs.microsoft.com/en-us/ef/core/miscellaneous/connection-resiliency
sqlOptions.EnableRetryOnFailure(maxRetryCount: 10, maxRetryDelay: TimeSpan.FromSeconds(30), errorNumbersToAdd: null);
});
});
services.Configure<CatalogSettings>(Configuration);
// Add framework services.


Loading…
Cancel
Save