Пример #1
0
        // This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
        public void Configure(IApplicationBuilder app, IHostingEnvironment env, DbContextAgenciesServices dbContext, ILoggerFactory loggerFactory)
        {
            loggerFactory.AddConsole(Configuration.GetSection("Logging"));
            loggerFactory.AddDebug();
            loggerFactory.AddFile("Logs/AgencyService-{Date}.txt");

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

            //dbContext.Database.Migrate();


            app.UseHttpsRedirection();
            app.UseMvc();
        }
Пример #2
0
 public AgenciesLogic(DbContextAgenciesServices dbContext,
                      ILoggerFactory loggerFactory)
 {
     this._dbContext = dbContext;
     this.logger     = loggerFactory.CreateLogger("CopaAirlines.AgenciesService.Logic.Agencies");
 }