Skip to content

Commit bf5af56

Browse files
CESARDLCESARDL
authored andcommitted
Setting ServiceLifetime.Scoped to OrderingContext so it is explicit instead of implicit (by default).
1 parent 8c6ee10 commit bf5af56

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

src/Services/Ordering/Ordering.API/Startup.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,10 @@ public IServiceProvider ConfigureServices(IServiceCollection services)
5252
{
5353
options.UseSqlServer(Configuration["ConnectionString"],
5454
sqlop => sqlop.MigrationsAssembly(typeof(Startup).GetTypeInfo().Assembly.GetName().Name));
55-
});
55+
},
56+
ServiceLifetime.Scoped
57+
);
58+
5659

5760
services.AddSwaggerGen();
5861
services.ConfigureSwaggerGen(options =>

0 commit comments

Comments
 (0)