src/Pess.Data/Identity/UserId.cs
/// <summary>
/// Compares the struct with the other nullable struct value.
/// </summary>
/// <param name="other">Other nullable struct value</param>
/// <returns>0 if two <see cref="UserId"/> are equal, 1 if this <see cref="UserId"/> comes after the other <see cref="UserId"/> and -1 if this <see cref="UserId"/> comes before the other <see cref="UserId"/>.</returns>
Compares the struct with the other nullable struct value.
Compares the struct with the other nullable struct value .
public int CompareTo(UserId? other)
        {
            if (other.HasValue)
                return other.Value.CompareTo(this);
            return 1;
        }
public int CompareTo ( UserId ? other ) { if ( other . HasValue ) return other . Value . CompareTo ( this ) ; return 1 ; }
Compares the struct with the other nullable struct value.
Compares the struct with the other nullable struct value .
// if nullable has value, compare the struct like a non-nullable //otherwise the non-null value is considered greater
0 if two  are equal, 1 if this  comes after the other  and -1 if this  comes before the other .
0 if two are equal 1 if this comes after the other and - 1 if this comes before the other .
other
UserId?
Other nullable struct value
Other nullable struct value