change to make test pass for issue 171

This commit is contained in:
Tom Gardham-Pallister 2017-12-12 07:45:03 +00:00
parent 526e2dbf18
commit 79029f50d3

View File

@ -117,7 +117,7 @@ namespace Ocelot.DependencyInjection
// see this for why we register this as singleton http://stackoverflow.com/questions/37371264/invalidoperationexception-unable-to-resolve-service-for-type-microsoft-aspnetc
// could maybe use a scoped data repository
_services.TryAddSingleton<IHttpContextAccessor, HttpContextAccessor>();
_services.TryAddScoped<IRequestScopedDataRepository, HttpDataRepository>();
_services.TryAddSingleton<IRequestScopedDataRepository, HttpDataRepository>();
_services.AddMemoryCache();
_services.TryAddSingleton<OcelotDiagnosticListener>();