Esempio n. 1
0
        public void ConfigureServices(IServiceCollection services)
        {
            services.AddSingleton(_configuration);

            services.AddRazorPages();
            services.AddServerSideBlazor();

            services.AddSingleton(new MapperConfiguration(cfg => MappingConfiguration.Configure(cfg)).CreateMapper());

            ServicesConfiguration.Register(services);
        }
Esempio n. 2
0
        public void ConfigureServices(IServiceCollection services)
        {
            services.AddSingleton(_configuration);

            services.AddControllers();
            services.AddRouting(options => options.LowercaseUrls = true);

            services.AddSwaggerGen(c =>
            {
                c.SwaggerDoc("v1", new OpenApiInfo {
                    Title = "Cirl.Api", Version = "v1"
                });
            });

            services.AddSingleton(new MapperConfiguration(cfg => MappingConfiguration.Configure(cfg)).CreateMapper());

            ServicesConfiguration.Register(services);
        }