private async void RegistrationInitiated(RegistrationTransactionModel transaction) { TransactionsContainer.AddTransaction(transaction); _transactionProcessor.Strategy = TransactionProcessStrategy.Registration; await _transactionProcessor.ProcessTransaction( new Message() { From = new User { Id = transaction.RecipientId } }, transaction, new SqlServerContext(_config["DB:MsSqlDb:ConnectionString"])); }
private async void ExecuteTransactionProcessing(Message message, object transaction, TransactionProcessStrategy strategy) { try { _transactionsProcessor.Strategy = strategy; await _transactionsProcessor.ProcessTransaction(message, transaction, new SqlServerContext(_config["DB:MsSqlDb:ConnectionString"])); } catch (Exception ex) { _logger.LogError($"{ex.Message} | Stack trace: {ex.StackTrace}"); } }