Example #1
0
 public void Handle(ActivateOrder command)
 {
     using (IUnitOfWork uow = this.CreateUnitOfWork <OrderAggregate>())
     {
         IOrderRepository repository = IoC.Container.Resolve <IOrderRepository>(uow);
         OrderAggregate   order      = repository.GetById(command.OrderId.ToString(), "OrderLines");
         order.Activate();
         repository.Update(order);
         uow.Commit();
         order.PublishEvents();
     }
 }
Example #2
0
        public void ActivateOrder(Guid orderId)
        {
            ActivateOrder request = new ActivateOrder(orderId);

            this.Execute(request);
        }