public override bool Equals(object obj) { if (obj == null) { return(false); } if (obj == this) { return(true); } return(obj is InventoryTransfer other && ((Id == null && other.Id == null) || (Id?.Equals(other.Id) == true)) && ((ReferenceId == null && other.ReferenceId == null) || (ReferenceId?.Equals(other.ReferenceId) == true)) && ((State == null && other.State == null) || (State?.Equals(other.State) == true)) && ((FromLocationId == null && other.FromLocationId == null) || (FromLocationId?.Equals(other.FromLocationId) == true)) && ((ToLocationId == null && other.ToLocationId == null) || (ToLocationId?.Equals(other.ToLocationId) == true)) && ((CatalogObjectId == null && other.CatalogObjectId == null) || (CatalogObjectId?.Equals(other.CatalogObjectId) == true)) && ((CatalogObjectType == null && other.CatalogObjectType == null) || (CatalogObjectType?.Equals(other.CatalogObjectType) == true)) && ((Quantity == null && other.Quantity == null) || (Quantity?.Equals(other.Quantity) == true)) && ((OccurredAt == null && other.OccurredAt == null) || (OccurredAt?.Equals(other.OccurredAt) == true)) && ((CreatedAt == null && other.CreatedAt == null) || (CreatedAt?.Equals(other.CreatedAt) == true)) && ((Source == null && other.Source == null) || (Source?.Equals(other.Source) == true)) && ((EmployeeId == null && other.EmployeeId == null) || (EmployeeId?.Equals(other.EmployeeId) == true))); }
public override int GetHashCode() { int hashCode = -136136157; if (Id != null) { hashCode += Id.GetHashCode(); } if (ReferenceId != null) { hashCode += ReferenceId.GetHashCode(); } if (State != null) { hashCode += State.GetHashCode(); } if (FromLocationId != null) { hashCode += FromLocationId.GetHashCode(); } if (ToLocationId != null) { hashCode += ToLocationId.GetHashCode(); } if (CatalogObjectId != null) { hashCode += CatalogObjectId.GetHashCode(); } if (CatalogObjectType != null) { hashCode += CatalogObjectType.GetHashCode(); } if (Quantity != null) { hashCode += Quantity.GetHashCode(); } if (OccurredAt != null) { hashCode += OccurredAt.GetHashCode(); } if (CreatedAt != null) { hashCode += CreatedAt.GetHashCode(); } if (Source != null) { hashCode += Source.GetHashCode(); } if (EmployeeId != null) { hashCode += EmployeeId.GetHashCode(); } return(hashCode); }