public void ConfigureServices(IServiceCollection services) { ConfiguracaoDoMvc.Configurar(services); //ConfiguracaoDeAutenticacao.Configurar(services, Configuration); ConfiguracaoDeInjecaoDeDependencia.Configurar(services, Configuration); ConfiguracaoDeSessaoDoBanco.Configurar(services, Configuration); }
// This method gets called by the runtime. Use this method to add services to the container. public void ConfigureServices(IServiceCollection services) { ConfiguracaoDoMVC.Configurar(services); ConfiguracaoDeInjecaoDeDependencia.Configurar(services, Configuration); ConfiguracaoDoSwagger.Configurar(services); ConfiguracaoDoRedis.Configurar(services, Configuration); }
public void ConfigureServices(IServiceCollection services) { ConfiguracaoDeInjecaoDeDependencia.Configurar(services, _configuration); services.AddControllers(); services.AddDbContext <PagamentoContext>(options => options.UseSqlServer(_configuration.GetConnectionString("DefaultConnection"), b => b.MigrationsAssembly("EventSourcing_Pagamento.Infra"))); services.AddHostedService <RabbitMqSubscriber>(); }
public void ConfigureServices(IServiceCollection services) { services.AddControllers(); services.AddDbContext <PedidoContext>(options => options.UseSqlServer(_configuration.GetConnectionString("DefaultConnection"), b => b.MigrationsAssembly("EventSourcing_Pedido.Infra"))); ConfiguracaoDeInjecaoDeDependencia.Configurar(services, _configuration); ConfiguracaoDoSwagger.Configurar(services); services.AddMvc(config => { config.Filters.Add(typeof(ExcecaoFiltro)); }); }
// This method gets called by the runtime. Use this method to add services to the container. public void ConfigureServices(IServiceCollection services) { ConfiguracaoDeInjecaoDeDependencia.Configurar(services, Configuration); ConfiguracaoDoSwagger.Configurar(services); services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_2_2); }
public void ConfigureServices(IServiceCollection services) { ConfiguracaoDeInjecaoDeDependencia.Configurar(services); ConfiguracaoDoSwagger.Configurar(services); services.AddControllers(); }