public async Task Dispatch <T>(T command) where T : DomainCommand { var log = _logfactory.CreateLogger <T>(); try { log.LogInformation($"Start dispatch '{typeof(T)}' domain command"); await _commandService.Dispatch(command); log.LogInformation($"End dispatch '{typeof(T)}' domain command"); } catch (Exception ex) { log.LogError(ex, $"Error dispatching '{typeof(T)}' domain command"); throw; } }
public async Task HandleCommand([NServiceBusTrigger(Endpoint = QueueNames.UpdateVendorRegistrationCaseStatus)] UpdateVendorRegistrationCaseStatusForAccountCommand command) { await _commandService.Dispatch(command); }
public async Task HandleCommand([NServiceBusTrigger(Endpoint = QueueNames.ApprenticeshipIncentivesWithdraw)] WithdrawCommand command) { await _commandService.Dispatch(command); }
public async Task HandleCommand([NServiceBusTrigger(Endpoint = QueueNames.CompleteEarningsCalculation)] CompleteEarningsCalculationCommand command) { await _commandService.Dispatch(command); }
public async Task HandleCommand([NServiceBusTrigger(Endpoint = QueueNames.ApprenticeshipIncentivesCalculateEarnings)] CalculateEarningsCommand command) { await _commandService.Dispatch(command); }