Ejemplo n.º 1
0
        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...");
        }
Ejemplo n.º 2
0
        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();
        }
Ejemplo n.º 3
0
        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();
        }