/// <summary> /// Returns true if Category instances are equal /// </summary> /// <param name="other">Instance of Category to be compared</param> /// <returns>Boolean</returns> public bool Equals(Category other) { if (ReferenceEquals(null, other)) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return (( CategoryId == other.CategoryId || CategoryId != null && CategoryId.Equals(other.CategoryId) ) && ( Name == other.Name || Name != null && Name.Equals(other.Name) ) && ( Info == other.Info || Info != null && Info.Equals(other.Info) ) && ( CategoryItems == other.CategoryItems || CategoryItems != null && CategoryItems.SequenceEqual(other.CategoryItems) ) && ( Buy == other.Buy || Buy != null && Buy.Equals(other.Buy) ) && ( Sell == other.Sell || Sell != null && Sell.Equals(other.Sell) )); }