Exemplo n.º 1
0
        // This method gets called by the runtime. Use this method to add services to the container.
        public IServiceProvider ConfigureServices(IServiceCollection services)
        {
            services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_2_1);
            var provider = new Core.AppStartup.Startup().Start(services);

            return(provider);
        }
Exemplo n.º 2
0
        // This method gets called by the runtime. Use this method to add services to the container.
        public IServiceProvider ConfigureServices(IServiceCollection services)
        {
            // services.AddMvc() serve ad aggiungere questi servizi ad mvc e averli disponibili nell'applicativo
            services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_2_1);
            // C'è la tecnica di spostare le logiche di avvio in un progetto ad hoc perché in questo caso viene popolato questo services con una
            // tecnica custom
            var provider = new Core.AppStartup.Startup().Start(services);

            return(provider);
        }