Skip to content
This repository was archived by the owner on Jan 10, 2026. It is now read-only.
This repository was archived by the owner on Jan 10, 2026. It is now read-only.

Too much equality? #31

@sliekens

Description

@sliekens

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions