Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Too much equality? #31

Open
sliekens opened this issue Nov 1, 2015 · 0 comments
Open

Too much equality? #31

sliekens opened this issue Nov 1, 2015 · 0 comments
Labels
Milestone

Comments

@sliekens
Copy link
Collaborator

sliekens commented Nov 1, 2015

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?

https://msdn.microsoft.com/en-us/library/vstudio/7h9bszxx(v=vs.110).aspx
http://www.informit.com/articles/article.aspx?p=2425867

@sliekens sliekens added this to the v2.0.0 milestone Nov 1, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant