public IAggregate Handle(MarkCustomerAsPreferred command) { var customer = _domainRepository.GetById <Customer>(command.Id); customer.MakePreferred(command.Discount); return(customer); }
public void Handle(MarkCustomerAsPreferred command) { var customer = this.customerRepository.GetById(command.Id); customer.MakePreferred(command.Discount); }