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 });
 }
Ejemplo n.º 2
0
        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);
 }
Ejemplo n.º 4
0
 private async Task Handle(SellArticleCommand command)
 {
     await Repository.ExecuteOn <ArticleAggregateRoot>(command.ArticleId, command);
 }