|
|
@ -48,11 +48,13 @@ |
|
|
|
}).AddControllersAsServices(); |
|
|
|
|
|
|
|
services.AddEntityFrameworkSqlServer() |
|
|
|
.AddDbContext<OrderingContext>(options => |
|
|
|
{ |
|
|
|
options.UseSqlServer(Configuration["ConnectionString"], |
|
|
|
sqlop => sqlop.MigrationsAssembly(typeof(Startup).GetTypeInfo().Assembly.GetName().Name)); |
|
|
|
}); |
|
|
|
.AddDbContext<OrderingContext>(options => |
|
|
|
{ |
|
|
|
options.UseSqlServer(Configuration["ConnectionString"], |
|
|
|
sqlop => sqlop.MigrationsAssembly(typeof(Startup).GetTypeInfo().Assembly.GetName().Name)); |
|
|
|
}, |
|
|
|
ServiceLifetime.Scoped |
|
|
|
); |
|
|
|
|
|
|
|
services.AddSwaggerGen(); |
|
|
|
services.ConfigureSwaggerGen(options => |
|
|
|