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); }