public override bool Equals(AbstractEntity other) { if (other == null) { return(false); } if (!ObjectContext.GetObjectType(GetType()).Equals(ObjectContext.GetObjectType(other.GetType()))) { return(false); } TripleKeyEntity <TKeyA, TKeyB, TKeyC> castedOther = (TripleKeyEntity <TKeyA, TKeyB, TKeyC>)other; return(!castedOther.IsEmptyKey() && KeyA.Equals(castedOther.KeyA) && KeyB.Equals(castedOther.KeyB) && KeyC.Equals(castedOther.KeyC)); }
public override int GetHashCode() { return(IsEmptyKey() ? 0 : KeyA.GetHashCode() ^ KeyB.GetHashCode() ^ KeyC.GetHashCode() ^ KeyD.GetHashCode()); }