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

This commit is contained in:
Cesar De la Torre 2017-10-11 10:00:39 -07:00
parent 373bdd9896
commit 121a92c557

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.