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); }
public virtual void RemoveSalesRepresentative(CustomerRepresentative customerRepresentative) { _customerRepresentatives.Remove(customerRepresentative); }
public virtual bool HasSalesRepresentative(CustomerRepresentative customerRepresentative) { return(_customerRepresentatives.Contains(customerRepresentative)); }