// 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);
        }
Exemple #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 = "Customer.API", Version = "v1"
                });
            });

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

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