Beispiel #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);
        }
Beispiel #2
0
        public static async Task BeforeScenarioAsync()
        {
            await MongoDbSetup.ResetAsync();

            await MongoDbSetup.InitAsync();
        }