From bf5af56d3258d9d3155d003689c1ad1a097a9edb Mon Sep 17 00:00:00 2001 From: CESARDL Date: Wed, 1 Feb 2017 18:56:28 -0800 Subject: [PATCH] Setting ServiceLifetime.Scoped to OrderingContext so it is explicit instead of implicit (by default). --- src/Services/Ordering/Ordering.API/Startup.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Services/Ordering/Ordering.API/Startup.cs b/src/Services/Ordering/Ordering.API/Startup.cs index 05a7defbb..62be0893f 100644 --- a/src/Services/Ordering/Ordering.API/Startup.cs +++ b/src/Services/Ordering/Ordering.API/Startup.cs @@ -52,7 +52,10 @@ { options.UseSqlServer(Configuration["ConnectionString"], sqlop => sqlop.MigrationsAssembly(typeof(Startup).GetTypeInfo().Assembly.GetName().Name)); - }); + }, + ServiceLifetime.Scoped + ); + services.AddSwaggerGen(); services.ConfigureSwaggerGen(options =>