Ejemplo n.º 1
0
        public IServiceProvider ConfigureServices(IServiceCollection services)
        {
            #region [MVC Register]

            //services.Configure<CookiePolicyOptions>(options =>
            //    {
            //        options.CheckConsentNeeded = context => true;
            //        options.MinimumSameSitePolicy = SameSiteMode.None;
            //    });

            services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_2_1);

            services.AddScoped <IViewRenderService, ViewRenderService>();

            services.AddSession();

            #endregion [MVC Register]


            #region [Configuration Register]

            var configuration = new ConfigurationHelper();
            Configuration.Bind("Configuration", configuration);
            services.AddSingleton(configuration);

            #endregion [Configuration Register]

            #region [Autofac]

            var builder = new ContainerBuilder();

            builder.Populate(services);
            AutofacBootstrapper.BuilderContainer(builder);
            this.ApplicationContainer = AutofacBootstrapper.GetContainer();

            return(new AutofacServiceProvider(this.ApplicationContainer));

            #endregion [Autofac]
        }
        public CreateOrdineClienteTest()
        {
            var builder = AutofacBootstrapper.BuilderContainer();

            this._container = builder.Build();
        }
        public CreateArticoloTest()
        {
            var builder = AutofacBootstrapper.BuilderContainer();

            this._container = builder.Build();
        }
Ejemplo n.º 4
0
        public ModificaDescrizioneArticoloTest()
        {
            var builder = AutofacBootstrapper.BuilderContainer();

            this._container = builder.Build();
        }