// 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); IoCConfig.Inicializar(); ConfigurarIoCAdicional(); IoCConfig.ConstrutorContainer.Populate(services); return(new AutofacServiceProvider(IoCConfig.ConstrutorContainer.Build())); }
public static void ConfigureContainer(ContainerBuilder builder) { builder.RegisterType <ConfiguracoesAplicacao>().As <ConfiguracoesAplicacaoAbstrato>().InstancePerLifetimeScope(); IoCConfig.Inicializar(builder); }