public void Handle(UserWantsToRemoveCustomer @event) { if (!BusinessRule.CustomerMustExist.IsSatisifedBy(this.State)) { this.Publish(new UserWantsToRemoveCustomerFailed { Name = this.Name, Reason = "The customer does not exists." }); } this.Publish(new CustomerRemovedByUser { CustomerId = this.Id }); }
public void Handle(UserWantsToRemoveCustomer @event) { Handle(@event.CustomerId, @event); }