/// <summary> /// Processes the received command. /// </summary> /// <param name="command">The command.</param> /// <returns></returns> public async Task ProcessReceivedCommand(SubmitReceivedCommand command) { // Do some business validation here. Make calls to the Query side to get additional domain info. // Send the command to the command bus await this.CommandBus.Send(command); }
/// <summary> /// Handles the specified notification. /// </summary> /// <param name="command">The command.</param> public async Task Handle(CommandReceivedEvent notification) { try { SubmitReceivedCommand command = new SubmitReceivedCommand { Domain = notification.Command.Domain, CommandMessage = notification.Command.ToString() }; await this.CommandService.ProcessReceivedCommand(command); } catch (Exception ex) { base.HandleError(ex, notification); } }