Ejemplo n.º 1
0
        /// <summary>
        /// Returns true if RentalAgreement instances are equal
        /// </summary>
        /// <param name="other">Instance of RentalAgreement to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(RentalAgreement other)
        {
            if (other is null)
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     Id == other.Id ||
                     Id.Equals(other.Id)
                     ) &&
                 (
                     Number == other.Number ||
                     Number != null &&
                     Number.Equals(other.Number)
                 ) &&
                 (
                     Status == other.Status ||
                     Status != null &&
                     Status.Equals(other.Status)
                 ) &&
                 (
                     Equipment == other.Equipment ||
                     Equipment != null &&
                     Equipment.Equals(other.Equipment)
                 ) &&
                 (
                     Project == other.Project ||
                     Project != null &&
                     Project.Equals(other.Project)
                 ) &&
                 (
                     RentalAgreementRates == other.RentalAgreementRates ||
                     RentalAgreementRates != null &&
                     RentalAgreementRates.SequenceEqual(other.RentalAgreementRates)
                 ) &&
                 (
                     RentalAgreementConditions == other.RentalAgreementConditions ||
                     RentalAgreementConditions != null &&
                     RentalAgreementConditions.SequenceEqual(other.RentalAgreementConditions)
                 ) &&
                 (
                     TimeRecords == other.TimeRecords ||
                     TimeRecords != null &&
                     TimeRecords.SequenceEqual(other.TimeRecords)
                 ) &&
                 (
                     Note == other.Note ||
                     Note != null &&
                     Note.Equals(other.Note)
                 ) &&
                 (
                     EstimateStartWork == other.EstimateStartWork ||
                     EstimateStartWork != null &&
                     EstimateStartWork.Equals(other.EstimateStartWork)
                 ) &&
                 (
                     DatedOn == other.DatedOn ||
                     DatedOn != null &&
                     DatedOn.Equals(other.DatedOn)
                 ) &&
                 (
                     EstimateHours == other.EstimateHours ||
                     EstimateHours != null &&
                     EstimateHours.Equals(other.EstimateHours)
                 ) &&
                 (
                     EquipmentRate == other.EquipmentRate ||
                     EquipmentRate != null &&
                     EquipmentRate.Equals(other.EquipmentRate)
                 ) &&
                 (
                     RatePeriod == other.RatePeriod ||
                     RatePeriod != null &&
                     RatePeriod.Equals(other.RatePeriod)
                 ) &&
                 (
                     RateComment == other.RateComment ||
                     RateComment != null &&
                     RateComment.Equals(other.RateComment)
                 ));
        }