public override bool Equals(Object obj) { BaseDto baseDto = obj as BaseDto; if (baseDto == null) { return(false); } else { return(Id.Equals(baseDto.Id)); } }
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"); } }