public override int GetHashCode() { unchecked { var hashCode = (Id != null ? Id.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (ReferenceModel != null ? ReferenceModel.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (ReferenceModels1 != null ? ReferenceModels1.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (ReferenceModels2 != null ? ReferenceModels2.GetHashCode() : 0); return(hashCode); } }
protected bool Equals(ReferenceTypesReferenceModel other) { return(string.Equals(Id, other.Id) && Equals(ReferenceModel, other.ReferenceModel) && (ReferenceModels1?.SequenceEqual(other.ReferenceModels1) ?? other.ReferenceModels1 == null) && (ReferenceModels2?.SequenceEqual(other.ReferenceModels2) ?? other.ReferenceModels2 == null)); }