示例#1
0
 public void ConfigureServices(IServiceCollection services)
 {
     ConfiguracaoDoMvc.Configurar(services);
     //ConfiguracaoDeAutenticacao.Configurar(services, Configuration);
     ConfiguracaoDeInjecaoDeDependencia.Configurar(services, Configuration);
     ConfiguracaoDeSessaoDoBanco.Configurar(services, Configuration);
 }
示例#2
0
 // 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);
 }
示例#3
0
 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>();
 }
示例#4
0
 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));
     });
 }
示例#5
0
 // 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);
 }
示例#6
0
 public void ConfigureServices(IServiceCollection services)
 {
     ConfiguracaoDeInjecaoDeDependencia.Configurar(services);
     ConfiguracaoDoSwagger.Configurar(services);
     services.AddControllers();
 }