/// <summary>
 /// Enum types are equal by primary key
 /// </summary>
 public bool Equals(AgreementPersonRole other)
 {
     if (other == null)
     {
         return(false);
     }
     return(other.AgreementPersonRoleID == AgreementPersonRoleID);
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Constructor for building a new object with MinimalConstructor required fields, using objects whenever possible
 /// </summary>
 public AgreementPerson(Agreement agreement, Person person, AgreementPersonRole agreementPersonRole) : this()
 {
     // Mark this as a new object by setting primary key with special value
     this.AgreementPersonID = ModelObjectHelpers.MakeNextUnsavedPrimaryKeyValue();
     this.AgreementID       = agreement.AgreementID;
     this.Agreement         = agreement;
     agreement.AgreementPeople.Add(this);
     this.PersonID = person.PersonID;
     this.Person   = person;
     person.AgreementPeople.Add(this);
     this.AgreementPersonRoleID = agreementPersonRole.AgreementPersonRoleID;
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Creates a "blank" object of this type and populates primitives with defaults
 /// </summary>
 public static AgreementPerson CreateNewBlank(Agreement agreement, Person person, AgreementPersonRole agreementPersonRole)
 {
     return(new AgreementPerson(agreement, person, agreementPersonRole));
 }