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.AddOptions();

            CorsExtensions.Add(services, Configuration);
            SwaggerExtension.Add(services);
            BLL.Configuration.Add(services);

            services.AddControllers();
        }
Ejemplo n.º 2
0
        public void ConfigureServices(IServiceCollection services)
        {
            services.AddControllers();
            var repositoriesInitializer = new RepositoriesInitializer();

            repositoriesInitializer.InitializeRepositories(services);
            var initializer = new Initializer();

            initializer.Initialize(services, Configuration.GetConnectionString("DefaultConnection"));
            services.AddTransient <IJwtHelper, JwtHelper>();
            JwtExtensions.AddJwt(services, Configuration);
            CorsExtensions.Add(services, Configuration);
            SwaggerExtension.Add(services, Configuration);
            services.AddMvcCore().AddApiExplorer();
        }