Beispiel #1
0
        public void Configure(IApplicationBuilder app)
        {
            app.UseDetection();
            app.UseDeveloperExceptionPage();
            app.UseDatabaseErrorPage();
            app.UseStaticFiles();
            app.UseRouting();
            app.UseAuthentication();
            app.UseAuthorization();
            app.UseSession();
            app.UseEndpoints(endpoints =>
            {
                endpoints.MapControllerRoute(
                    name: "default",
                    pattern: "{controller=Home}/{action=Index}/{id?}");
                endpoints.MapRazorPages();
            });

            CartManager.Configure(app.ApplicationServices.GetRequiredService <IHttpContextAccessor>());
        }