예제 #1
0
        public async Task HandleAsync(PortfolioCreated @event)
        {
            if (@event == null)
            {
                throw new CustomException("portfolio_event_empty", "Could not create the portfolio.");
            }

            var portfolio = mapper.Map <Portfolio>(@event);
            await portfolioService.CreateNewPortfolioAsync(portfolio);
        }