public override bool Equals(AbstractEntity other)
        {
            if (other == null)
            {
                return(false);
            }

            if (!ObjectContext.GetObjectType(GetType()).Equals(ObjectContext.GetObjectType(other.GetType())))
            {
                return(false);
            }

            QuadrupleKeyEntity <TKeyA, TKeyB, TKeyC, TKeyD> castedOther = (QuadrupleKeyEntity <TKeyA, TKeyB, TKeyC, TKeyD>)other;

            return(!castedOther.IsEmptyKey() &&
                   KeyA.Equals(castedOther.KeyA) &&
                   KeyB.Equals(castedOther.KeyB) &&
                   KeyC.Equals(castedOther.KeyC) &&
                   KeyD.Equals(castedOther.KeyD));
        }
Exemple #2
0
        public override bool Equals(AbstractEntity other)
        {
            if (other == null)
            {
                return(false);
            }

            if (!ObjectContext.GetObjectType(GetType()).Equals(ObjectContext.GetObjectType(other.GetType())))
            {
                return(false);
            }

            SingleKeyEntity <T> castedOther = (SingleKeyEntity <T>)other;

            return(!castedOther.IsEmptyKey() && Id.Equals(castedOther.Id));
        }