public async Task <bool> Handle(CustomerAccountAddCommand command, CancellationToken cancellationToken) { _logger.LogInformation($"Handle({nameof(CustomerAddCommandHandler)}) -> {command}"); var account = CustomerAccount.CreateNew(command.Id, command.BankAccount, command.MarkAsDefault); _dataService.ExecuteQuery("UPDATE CustomerAccounts set MarkAsDefault = 0 WHERE Id = @id", new MySqlParameter("@id", command.Id)); var result = _dataService.Add(account); await _mediator.Publish(Apply(command)); return(result); }