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

            return
                ((
                     Id == other.Id ||
                     Id != null &&
                     Id.Equals(other.Id)
                     ) &&
                 (
                     GrowthStage == other.GrowthStage ||
                     GrowthStage != null &&
                     GrowthStage.Equals(other.GrowthStage)
                 ) &&
                 (
                     Ko == other.Ko ||
                     Ko != null &&
                     Ko.Equals(other.Ko)
                 ));
        }
Beispiel #2
0
        /// <summary>
        /// Returns true if SendSurveyData instances are equal
        /// </summary>
        /// <param name="other">Instance of SendSurveyData to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(SendSurveyData other)
        {
            if (ReferenceEquals(null, other))
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     FarmId == other.FarmId ||
                     FarmId != null &&
                     FarmId.Equals(other.FarmId)
                     ) &&
                 (
                     Date == other.Date ||
                     Date != null &&
                     Date.Equals(other.Date)
                 ) &&
                 (
                     Plant == other.Plant ||
                     Plant != null &&
                     Plant.Equals(other.Plant)
                 ) &&
                 (
                     GrowthStage == other.GrowthStage ||
                     GrowthStage != null &&
                     GrowthStage.Equals(other.GrowthStage)
                 ) &&
                 (
                     Answer == other.Answer ||
                     Answer != null &&
                     Answer.SequenceEqual(other.Answer)
                 ));
        }