Exemplo 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();

            SwaggerSetup.ConfigureServices(services);

            CorsSetup.ConfigureServices(services);

            EntityFrameWorkSetup.ConfigurationServices(services, Configuration);

            DependencyInjectionSetup.ConfigureServices(services);

            JWTSetup.ConfigureServices(services, Configuration);

            AutoMapperSetup.ConfigureServices(services);
        }
Exemplo 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();

            //Configuração do Swagger
            SwaggerSetup.ConfigureServices(services);

            //Configuração do CORS
            CorsSetup.ConfigureServices(services);

            //Configuração do EntityFramework
            EntityFrameworkSetup.ConfigureServices(services, Configuration);

            //Configuração de Injeção de Dependência
            DependencyInjectionSetup.ConfigureServices(services);

            //Configuração do AutoMapper
            AutoMapperSetup.ConfigureServices(services);
        }