// 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); }
// 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) { ServicesModule.ConfigureServices(services); }