Which of the following is correct/better, considering that identity property could be null.
public override int GetHashCode() { if (ID == null) { ret
Perhaps what you want is something like this?
override int GetHashCode() { if (ID != null) return ID.GetHashCode(); return DBNull.Value.GetHashCode(); }
The important thing is this, should two objects with null IDs be considered equal?