コード例 #1
0
ファイル: Startup.cs プロジェクト: Arnegil/PizzaDelivery
        // This method gets called by the runtime. Use this method to add services to the container.
        public void ConfigureServices(IServiceCollection services)
        {
            DomainServicesModule.ConfigureServices(services);
            ServicesModule.ConfigureServices(services);
            VMServicesModule.ConfigureServices(services);

            services.AddAuthentication(CookieAuthenticationDefaults.AuthenticationScheme)
            .AddCookie(options =>
            {
                //Адрес страницы аутентификации
                options.LoginPath = new Microsoft.AspNetCore.Http.PathString("/Auth/Login");
            });
            services
            .AddMvc()
            .AddSessionStateTempDataProvider();
            services.AddSession();
        }
コード例 #2
0
ファイル: Startup.cs プロジェクト: LeafStrike/PizzaDelivery
        // This method gets called by the runtime. Use this method to add services to the container.
        public void ConfigureServices(IServiceCollection services)
        {
            VMServicesModule.ConfigureServices(services);

            services.AddMvc();
        }