public IntegrationEventLogService(DbConnection dbConnection, ILogger <IntegrationEventLogService> logger) { _dbConnection = dbConnection ?? throw new ArgumentNullException(nameof(dbConnection)); _logger = logger; _integrationEventLogContext = new IntegrationEventLogContext( new DbContextOptionsBuilder <IntegrationEventLogContext>() .UseSqlServer(_dbConnection) .Options); _logger.LogInformation(" [x] IntegrationEventLogService: Creating a new instance..."); }
public IntegrationEventLogService(DbConnection dbConnection) { _dbConnection = dbConnection ?? throw new ArgumentNullException(nameof(dbConnection)); _integrationEventLogContext = new IntegrationEventLogContext( new DbContextOptionsBuilder <IntegrationEventLogContext>() .UseSqlServer(_dbConnection) .Options); _eventTypes = Assembly.Load(Assembly.GetEntryAssembly().FullName) .GetTypes() .Where(t => t.Name.EndsWith(nameof(IntegrationEvent))) .ToList(); }
public IntegrationEventLogService(DbConnection dbConnection) { _dbConnection = dbConnection ?? throw new ArgumentNullException(nameof(dbConnection)); _integrationEventLogContext = new IntegrationEventLogContext( new DbContextOptionsBuilder <IntegrationEventLogContext>() .UseSqlServer(_dbConnection) .ConfigureWarnings(warnings => warnings.Throw(RelationalEventId.QueryClientEvaluationWarning)) .Options); _eventTypes = Assembly.Load(Assembly.GetEntryAssembly().FullName) .GetTypes() .Where(t => t.Name.EndsWith(nameof(IntegrationEvent))) .ToList(); }