protected bool Equals(AssociationRecord other) { return(Id == other.Id && AssocDays == other.AssocDays && string.Equals(AssocLocationSuffix, other.AssocLocationSuffix) && string.Equals(AssocTrainUid, other.AssocTrainUid) && AssocType == other.AssocType && string.Equals(BaseLocationSuffix, other.BaseLocationSuffix) && Category == other.Category && DateFrom.Equals(other.DateFrom) && DateIndicator == other.DateIndicator && DateTo.Equals(other.DateTo) && string.Equals(DiagramType, other.DiagramType) && string.Equals(Location, other.Location) && string.Equals(MainTrainUid, other.MainTrainUid) && RecordIdentity == other.RecordIdentity && StpIndicator == other.StpIndicator); }
// override Equals in order .Distinct to work public override bool Equals(Object obj) { //Check for null and compare run-time types. if ((obj == null) || !this.GetType().Equals(obj.GetType())) { return(false); } else { Employee e = (Employee)obj; return((EmployeeID == e.EmployeeID) && (ProjectID == e.ProjectID) && (DateFrom.Equals(e.DateFrom)) && (DateTo.Equals(e.DateTo))); } }