예제 #1
0
        public void ConfigureServices(IServiceCollection services)
        {
            // Add your AppInsights ID here to make it globally available //
            // services.AddApplicationInsightsTelemetry("465f47b3-8d7a-46ee-a81e-e51182c12296");

            // Inject config
            services.Configure <Secrets.ConnectionStrings>(Configuration.GetSection("ConnectionStrings"));
            services.Configure <Secrets.Login>(Configuration.GetSection("ConnectionStrings"));

            //  project's DI
            services.AddSingleton <MyEmail>();

            //  DI config
            Bootstrap.DataProtection(services, Configuration);
            Bootstrap.ConsentCookie(services, Configuration, HostingEnvironment.IsDevelopment());

            services.AddNodeServices();

            services.AddRazorPages();

            Bootstrap.Compression(services);
        }