Beispiel #1
0
 public HomeController(ILogger <HomeController> logger,
                       IDatabaseRepository databaseRepository,
                       IHubContext <BuyerHub> hubContext,
                       IDatabaseSubscription databaseSubscription, IConfiguration configuration)
 {
     _logger             = logger;
     _databaseRepository = databaseRepository;
     _hubContext         = hubContext;
     databaseSubscription.Configure(configuration.GetConnectionString("DbInterview"));
 }
Beispiel #2
0
 public void Configure(IApplicationBuilder app, IHostingEnvironment env, IDatabaseSubscription databaseSubscription)
 {
     if (env.IsDevelopment())
     {
         app.UseDeveloperExceptionPage();
     }
     else
     {
         app.UseHsts();
     }
     app.UseHttpsRedirection();
     app.UseMvc();
     databaseSubscription.Configure();
 }