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

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

            ApplicationServicesRegistrator.AddApplicationServices(services);
            PersistenceServicesRegistrator.AddPersistenceServices(services, Configuration);
        }
        public static void ConfigureServices(
            IServiceCollection services,
            IConfiguration configuration,
            string configRootPath)
        {
            var assembly    = typeof(HellEngineConfigurator).Assembly;
            var registrator = new ApplicationServicesRegistrator();

            registrator.RegisterApplicationOptions(
                services,
                configuration,
                configRootPath,
                assembly);
            registrator.RegisterApplicationServices(
                services,
                assembly);

            services.AddHostedService <HellEngineInitializer>();
        }