private void ConfigureServices() { var services = new ServiceCollection(); var configuration = new ConfigurationBuilder().AddJsonFile("appsettings.json").Build(); services.AddSingleton <IConfiguration>(configuration).AddFeatureManagement().AddFeatureFilter <PercentageFilter>();//.AddFeatureFilter<AccountIdFilter>(); ServicoConfig.ConfigurarEscopo(services); serviceProvider = services.BuildServiceProvider(); configuracaoApp = serviceProvider.GetRequiredService <IConfiguracaoApp>(); configuracaoApp.SetBancoDados_InMemory(true); Constantes.ChaveAutenticacao = configuration["Jwt:Key"]; }
public iCustomContexto(IConfiguracaoApp configuracaoApp) : base() { _configuracaoApp = configuracaoApp; }