Inheritance: CQRSMicroservices.Framework.Command
 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);
 }
Beispiel #4
0
 private async Task Handle(SellArticleCommand command)
 {
     await Repository.ExecuteOn <ArticleAggregateRoot>(command.ArticleId, command);
 }