Ejemplo n.º 1
0
        public async Task HandleAsync(BuySecurity command)
        {
            try
            {
                await portfolioService.BuySecurityAsync(command);

                var securityBougt = new SecurityBought(command.SecurityId, command.UserId, command.PortfolioId, command.Name,
                                                       command.Symbol, command.CurrentValue, command.Quantity);

                await busClient.PublishAsync(securityBougt);
            }
            catch (CustomException)
            {
            }
        }