Ejemplo n.º 1
0
        // This method gets called by the runtime. Use this method to add services to the container.
        public void ConfigureServices(IServiceCollection services)
        {
            services.AddControllers();

            //Setup para configuração do Swagger
            SwaggerSetup.AddSwaggerSetup(services);

            //Setup para configuração do EF
            EntityFrameworkSetup.AddEntityFrameworkSetup(services, Configuration);

            //Setup para o JWT
            JwtBearerSetup.AddJwtBearerSetup(services, Configuration);

            //Setup para MongoDB
            MongoDbSetup.AddMongoDbSetup(services, Configuration);

            //Injecao de dependencia
            DependenxyInjection.Register(services);

            //Setup para MediatR
            MediatRSetup.AddMediatRSetup(services);

            //Setup para AutoMapper
            AutoMapperSetup.AddAutoMapperSetup(services);

            //Setup para o CORS
            CorsSetup.AddCorsSetup(services);
        }
Ejemplo n.º 2
0
        // This method gets called by the runtime. Use this method to add services to the container.
        public void ConfigureServices(IServiceCollection services)
        {
            services.AddControllers();

            EntityFrameworkSetup.AddEntityFrameworkSetup(services, Configuration);

            DependencyInjection.Register(services);

            AutoMapperSetup.AddAutoMapperSetup(services);

            CorsSetup.AddCorsSetup(services);

            SwaggerSetup.AddSwaggerSetup(services);
        }
Ejemplo n.º 3
0
 // This method gets called by the runtime. Use this method to add services to the container.
 public void ConfigureServices(IServiceCollection services)
 {
     services.AddControllers();
     //setup para configuração Swagger..
     SwaggerSetup.AddSwaggerSetup(services);
     //setup para configuração do EntityFramework..
     EntityFrameworkSetup.AddEntityFrameworkSetup(services, Configuration);
     //setup para configuração de injeção de dependencia..
     InjecaoDependencia.Registrar(services);
     //setup para JWT Bearer..
     JwtBearerSetup.AddJwtBearerSetup(services, Configuration);
     //setup para MongoDB..
     MongoDBSetup.AddMongoDBSetup(services, Configuration);
     //setup para MediatR..
     MediatRSetup.AddMediatRSetup(services);
     //setup para AutoMapper..
     AutoMapperSetup.AddAutoMapperSetup(services);
     //Setup para o Cors
     CorsSetup.AddCorsSetup(services);
 }