private void Handle(SellArticleCommand command) { if(!_available) { throw new Exception("This article is unavailable."); } RaiseEvent(new ArticleSoldEvent { ArticleId = command.ArticleId, CustomerId = command.CustomerId, Price = _price }); }
private void Handle(SellArticleCommand command) { if (!_available) { throw new Exception("This article is unavailable."); } RaiseEvent(new ArticleSoldEvent { ArticleId = command.ArticleId, CustomerId = command.CustomerId, Price = _price }); }
private async Task Handle(SellArticleCommand command) { await Repository.ExecuteOn<ArticleAggregateRoot>(command.ArticleId, command); }
private async Task Handle(SellArticleCommand command) { await Repository.ExecuteOn <ArticleAggregateRoot>(command.ArticleId, command); }