Esempio n. 1
0
        public void Configure(IApplicationBuilder app, IHostingEnvironment env)
        {
            app.UseMvc();

            StartupConfigurations.ConfigureCORS(app);
            StartupConfigurations.ConfigureSwagger(app);
        }
Esempio n. 2
0
        public void ConfigureServices(IServiceCollection services)
        {
            services.AddMvc()
            .SetCompatibilityVersion(CompatibilityVersion.Version_2_2)
            .AddJsonOptions(x =>
            {
                x.SerializerSettings.ContractResolver = new DefaultContractResolver
                {
                    NamingStrategy = new SnakeCaseNamingStrategy()
                };
            });

            StartupConfigurations.RegisterDatabase(services, Configuration);
            StartupConfigurations.RegisterOptions(services, Configuration);
            StartupConfigurations.AddCustomServices(services);
            StartupConfigurations.AddSwagger(services);
        }