示例#1
0
        // 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();
        }
示例#2
0
 /// <summary>
 ///
 /// </summary>
 public void Dispose()
 {
     _context = null;
 }
示例#3
0
 public DataBaseChanges(CustomerShoppingCartContext context, ILogger <DataBaseChanges> logger)
 {
     _context = context;
     _logger  = logger;
 }
示例#4
0
 public CustomerShoppingCart(IDataBaseChanges dataBaseChanges, CustomerShoppingCartContext customerShoppingCartContext)
 {
     _customerShoppingCartContext = customerShoppingCartContext;
     _dataBaseChanges             = dataBaseChanges;
 }