Exemplo 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.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_2_1);

            //Enable Swagger
            Swagger.ConfigureServices(services, Configuration);
        }
Exemplo 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()
            .AddNewtonsoftJson(options =>
                               options.SerializerSettings.Converters.Add(new StringEnumConverter()));
            services.AddSingleton(Configuration);
            RegisterContainers.ConfigureServices(services);
            RegisterDbContainer.ConfigureServices(services, Configuration["Settings:DbLocation"]);

            Swagger.ConfigureServices(services);
        }