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.AddControllers();
            services.AddSwaggerGen(c =>
            {
                c.SwaggerDoc("v1", new OpenApiInfo {
                    Title = "Catalog.API", Version = "v1"
                });
            });


            ApplicationServicesRegistrator.AddApplicationServices(services);
            InfrastructureServicesRegistrator.AddInfrastructureServices(services, Configuration);
            PersistenceServicesRegistrator.AddPersistenceServices(services, Configuration);
        }
Ejemplo 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();
            services.AddSwaggerGen(c =>
            {
                c.SwaggerDoc("v1", new OpenApiInfo {
                    Title = "ProjectDetail.API", Version = "v1"
                });
            });

            #region DatabaseSettings setup
            services.Configure <DatabaseSettings>(Configuration.GetSection("DatabaseSettings"));
            #endregion

            ApplicationServicesRegistrator.AddApplicationServices(services);
            InfrastructureServicesRegistrator.AddInfrastructureServices(services, Configuration);
            PersistenceServicesRegistrator.AddPersistenceServices(services, Configuration);
        }