예제 #1
0
        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));
        }
예제 #2
0
 public override int GetHashCode()
 {
     return(IsEmptyKey() ? 0 : KeyA.GetHashCode() ^ KeyB.GetHashCode() ^ KeyC.GetHashCode() ^ KeyD.GetHashCode());
 }