コード例 #1
0
        public IAggregate Handle(MarkCustomerAsPreferred command)
        {
            var customer = _domainRepository.GetById <Customer>(command.Id);

            customer.MakePreferred(command.Discount);
            return(customer);
        }
コード例 #2
0
        public void Handle(MarkCustomerAsPreferred command)
        {
            var customer = this.customerRepository.GetById(command.Id);

            customer.MakePreferred(command.Discount);
        }