示例#1
0
        public virtual void AddCustomerRepresentative(CustomerRepresentative customerRepresentative)
        {
            //if CustomerRepresentative is a ValueObject this precondition may not make sense - please consult design
            Check.Require(() => Demand.The.Param(() => _customerRepresentatives).DoesNotContain(customerRepresentative));

            _customerRepresentatives.Add(customerRepresentative);
        }
示例#2
0
 public virtual void RemoveSalesRepresentative(CustomerRepresentative customerRepresentative)
 {
     _customerRepresentatives.Remove(customerRepresentative);
 }
示例#3
0
 public virtual bool HasSalesRepresentative(CustomerRepresentative customerRepresentative)
 {
     return(_customerRepresentatives.Contains(customerRepresentative));
 }