Beispiel #1
0
        // This method gets called by the runtime. Use this method to add services to the container.
        public void ConfigureServices(IServiceCollection services)
        {
            services.AddMvc()
            .SetCompatibilityVersion(CompatibilityVersion.Version_2_1);
            services.AddAutoMapper();

            DAModule.ConfigureServices(services, Configuration);
            ServicesModule.ConfigureServices(services, Configuration);
            AggregationModule.ConfigureDrivers(services, Configuration);
        }
Beispiel #2
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();
        }
Beispiel #3
0
 public static void ConfigureServices(IServiceCollection services)
 {
     ServicesModule.ConfigureServices(services);
 }