Inits the workflow configuration
This commit is contained in:
@ -50,9 +50,10 @@ namespace Yavsc.Services
|
||||
readonly ApplicationDbContext _dbContext;
|
||||
readonly IStringLocalizer _localizer;
|
||||
|
||||
public HubConnectionManager()
|
||||
public HubConnectionManager(IServiceScopeFactory ssf )
|
||||
{
|
||||
var scope = Startup.Services.GetRequiredService<IServiceScopeFactory>().CreateScope();
|
||||
|
||||
var scope = ssf.CreateScope();
|
||||
_dbContext = scope.ServiceProvider.GetService<ApplicationDbContext>();
|
||||
var loggerFactory = scope.ServiceProvider.GetService<ILoggerFactory>();
|
||||
_logger = loggerFactory.CreateLogger<HubConnectionManager>();
|
||||
|
@ -48,8 +48,8 @@ namespace Yavsc.Services
|
||||
|
||||
public CalendarManager(ILoggerFactory loggerFactory)
|
||||
{
|
||||
_client_id = Startup.GoogleWebClientConfiguration["web:cient_id"];
|
||||
_client_secret = Startup.GoogleWebClientConfiguration["web:cient_secret"];
|
||||
_client_id = Config.GoogleWebClientConfiguration["web:cient_id"];
|
||||
_client_secret = Config.GoogleWebClientConfiguration["web:cient_secret"];
|
||||
_logger = loggerFactory.CreateLogger<CalendarManager>();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user