/// <summary> /// Compare to other object. /// </summary> /// <param name="other"></param> /// <returns></returns> public int CompareTo(ModelBase <ID> other) { return(other is null ? 1 : this.GetHashCode().CompareTo(other.GetHashCode())); }
/// <summary> /// Compare objects. /// </summary> /// <param name="other"></param> /// <returns></returns> public virtual bool Equals(ModelBase <ID> other) { return(other != null && other == this || this.CompareTo(other) == 0); }