Beispiel #1
0
        public void ConfigureServices(IServiceCollection services)
        {
            ConfigureLog();

            services.AddControllers();

            services.AddSwaggerGen(s =>
            {
                s.SwaggerDoc("v1", new OpenApiInfo
                {
                    Version = "v1",
                    Title   = "Eleva Educação - Portal Escola API"
                });
            });

            services.AddAutoMapper(AppDomain.CurrentDomain.GetAssemblies());
            AutoMapperConfiguration.RegisterMappings();

            services.AddResponseCompression(options =>
            {
                options.Providers.Add <BrotliCompressionProvider>();
            });

            NativeDependencyInjector.RegisterServices(services);
        }
Beispiel #2
0
        // This method gets called by the runtime. Use this method to add services to the container.
        public void ConfigureServices(IServiceCollection services)
        {
            services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_2_1);
            services.AddCors();
            services.AddAutoMapperSetup();


            NativeDependencyInjector.RegisterServices(services);
        }