// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
        public void Configure(IApplicationBuilder app, IHostingEnvironment env, ConnectionStringsDbContext connectionStringDbContext)
        {
            if (env.IsDevelopment())
            {
                app.UseDeveloperExceptionPage();
            }
            else
            {
                app.UseHsts();
            }

            app.UseSwagger();
            app.UseSwaggerUI(x =>
                             x.SwaggerEndpoint("/swagger/v1/swagger.json", "API for CCCOne Connection Strings"));
            app.UseHttpsRedirection();
            // 2. Enable authentication middleware
            app.UseAuthentication();
            app.UseMvc();
            connectionStringDbContext.Database.EnsureCreated();
        }
Example #2
0
 public ConnectionStringRepository(ConnectionStringsDbContext aConnectionStringDbContext)
 {
     connectionStringDbContext = aConnectionStringDbContext;
 }