コード例 #1
0
        public void Configure(IApplicationBuilder app, IWebHostEnvironment env, EmailingDbContext db)
        {
            app.UseProjectDbContext <EmailingDbContext>();

            if (env.IsDevelopment())
            {
                app.UseDeveloperExceptionPage();
            }

            app.UseProjectCors();

            app.UseHttpsRedirection();

            app.UseRouting();

            app.UseProjectSwagger();

            app.UseEndpoints(endpoints =>
            {
                endpoints.MapControllers();
            });
        }
コード例 #2
0
 public EmailSender(IOptions <EmailSettings> options, EmailingDbContext db, ITemplator templator)
 {
     this.options   = options;
     this.db        = db;
     this.templator = templator;
 }