You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jan 10, 2026. It is now read-only.
Many entity classes implement interfaces like IEquatable and IComparable, but their implementation is questionable. What makes two API results equal? Is it their object ID in the API? Is it their localized name?
As a user, I would expect that reference equality is the only absolute indicator. Every other form of comparison would be implementation-specific (custom grouping and sorting etc.), and does not belong in the core library, but rather in a custom class that implements IComparer<TEntity>.
Should the current implementations be left as-is, changed or removed entirely?
Many entity classes implement interfaces like
IEquatableandIComparable, but their implementation is questionable. What makes two API results equal? Is it their object ID in the API? Is it their localized name?As a user, I would expect that reference equality is the only absolute indicator. Every other form of comparison would be implementation-specific (custom grouping and sorting etc.), and does not belong in the core library, but rather in a custom class that implements
IComparer<TEntity>.Should the current implementations be left as-is, changed or removed entirely?
https://msdn.microsoft.com/en-us/library/vstudio/7h9bszxx(v=vs.110).aspx
http://www.informit.com/articles/article.aspx?p=2425867