Exemple #1
0
        public override bool Equals(Object obj)
        {
            BaseDto baseDto = obj as BaseDto;

            if (baseDto == null)
            {
                return(false);
            }
            else
            {
                return(Id.Equals(baseDto.Id));
            }
        }
Exemple #2
0
        public virtual int CompareTo(object obj)
        {
            if (obj == null)
            {
                return(1);
            }

            BaseDto baseDto = obj as BaseDto;

            if (baseDto != null)
            {
                return(this.Id.CompareTo(baseDto.Id));
            }
            else
            {
                throw new ArgumentException("Object is not a BaseDto");
            }
        }