Any way to allow classes implementing IEntity and downcast to have operator == comparisons?
- by George Mauer
Basically here's the issue. All entities in my system are identified by their type and their id.
new Customer() { Id = 1} == new Customer() {Id = 1};
new Customer() { Id = 1} != new Customer() {Id = 2};
new Customer() { Id = 1} != new Product() {Id = 1};
Pretty standard scenario. Since all Entities have an Id I define an interface for all…