// This method gets called by the runtime. Use this method to configure the HTTP request pipeline. public void Configure(IApplicationBuilder app, IWebHostEnvironment env, CustomerShoppingCartContext context) { app.UseDeveloperExceptionPage(); app.UseSwagger(); app.UseSwaggerUI(c => c.SwaggerEndpoint("/swagger/v1/swagger.json", "CustomerShoppingApp v1")); app.UseHttpsRedirection(); app.UseRouting(); app.UseAuthorization(); app.UseEndpoints(endpoints => { endpoints.MapControllers(); }); context.Database.Migrate(); }
/// <summary> /// /// </summary> public void Dispose() { _context = null; }
public DataBaseChanges(CustomerShoppingCartContext context, ILogger <DataBaseChanges> logger) { _context = context; _logger = logger; }
public CustomerShoppingCart(IDataBaseChanges dataBaseChanges, CustomerShoppingCartContext customerShoppingCartContext) { _customerShoppingCartContext = customerShoppingCartContext; _dataBaseChanges = dataBaseChanges; }