Exemple #1
0
        // 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();
        }
        public static void ConfigureServices(IServiceCollection services)
        {
            DomainServicesModule.ConfigureServices(services);

            //services.AddTransient<IClientService>(provider => new ClientService());
        }