diff --git a/TransactionProcessor.BusinessLogic/Services/MerchantStatementDomainService.cs b/TransactionProcessor.BusinessLogic/Services/MerchantStatementDomainService.cs index a2b330f..bb59130 100644 --- a/TransactionProcessor.BusinessLogic/Services/MerchantStatementDomainService.cs +++ b/TransactionProcessor.BusinessLogic/Services/MerchantStatementDomainService.cs @@ -221,7 +221,7 @@ public async Task EmailStatement(MerchantStatementCommands.EmailMerchant return ResultHelpers.CreateFailure(getTokenResult); this.TokenResponse = getTokenResult.Data; - Result sendEmailResponseResult = await this.MessagingServiceClient.SendEmail(this.TokenResponse.AccessToken, sendEmailRequest, cancellationToken); + await this.MessagingServiceClient.SendEmail(this.TokenResponse.AccessToken, sendEmailRequest, cancellationToken); Result stateResult = merchantStatementAggregate.EmailStatement(DateTime.Now, messageId); if (stateResult.IsFailed) diff --git a/TransactionProcessor/Bootstrapper/RepositoryRegistry.cs b/TransactionProcessor/Bootstrapper/RepositoryRegistry.cs index e435b43..81ef54a 100644 --- a/TransactionProcessor/Bootstrapper/RepositoryRegistry.cs +++ b/TransactionProcessor/Bootstrapper/RepositoryRegistry.cs @@ -70,13 +70,13 @@ public RepositoryRegistry() this.AddSingleton>(c => () => { IAggregateService aggregateService = Startup.ServiceProvider.GetService(); - if (CachedAggregatesAdded == false) + if (RepositoryRegistry.CachedAggregatesAdded == false) { aggregateService.AddCachedAggregate(typeof(EstateAggregate), null); aggregateService.AddCachedAggregate(typeof(ContractAggregate), null); aggregateService.AddCachedAggregate(typeof(OperatorAggregate), null); aggregateService.AddCachedAggregate(typeof(MerchantAggregate), null); - CachedAggregatesAdded=true; + RepositoryRegistry.CachedAggregatesAdded=true; } return aggregateService;