protected bool Equals(ForecastEntity other) { return(Id == other.Id && string.Equals(City, other.City) && Date.Equals(other.Date) && Pressure.Equals(other.Pressure) && Humidity.Equals(other.Humidity) && TemperatureMorning.Equals(other.TemperatureMorning) && TemperatureDay.Equals(other.TemperatureDay) && TemperatureEvening.Equals(other.TemperatureEvening) && TemperatureNight.Equals(other.TemperatureNight) && WindSpeed.Equals(other.WindSpeed) && string.Equals(Description, other.Description) && string.Equals(Icon, other.Icon)); }
/// <summary> /// Returns true if Forecast instances are equal /// </summary> /// <param name="other">Instance of Forecast to be compared</param> /// <returns>Boolean</returns> public bool Equals(Forecast other) { if (ReferenceEquals(null, other)) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return (( Date == other.Date || Date != null && Date.Equals(other.Date) ) && ( Pressure == other.Pressure || Pressure != null && Pressure.Equals(other.Pressure) ) && ( Humidity == other.Humidity || Humidity != null && Humidity.Equals(other.Humidity) ) && ( WindSpeed == other.WindSpeed || WindSpeed != null && WindSpeed.Equals(other.WindSpeed) ) && ( Clouds == other.Clouds || Clouds != null && Clouds.Equals(other.Clouds) ) && ( Temperature == other.Temperature || Temperature != null && Temperature.Equals(other.Temperature) ) && ( Weather == other.Weather || Weather != null && Weather.Equals(other.Weather) )); }