// 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); }
// This method gets called by the runtime. Use this method to add services to the container. public void ConfigureServices(IServiceCollection services) { services.AddControllers(); SwaggerSetup.AddSwaggerSetup(services); EntityFrameworkSetup.AddEntityFrameworkSetup(services, Configuration); JwtBearerSetup.AddJwtBearerSetup(services, Configuration); MongoDBSetup.AddMongoDBSetup(services, Configuration); DependencyInjection.Register(services); MediatRSetup.AddMediatRSetup(services); AutoMapperSetup.AddAutoMapperSetup(services); CorsSetup.AddCorsSetup(services); }