Skip to main content

New answers tagged

2 votes

Implementing Generic Enumeration Classes in Domain Layer

You can simplify your work by caching the enumerations, and reuse them. This means,GetAll will call the reflection once on every unique type, which would improve ...
iSR5's user avatar
  • 5,508
2 votes
Accepted

Implementing Generic Enumeration Classes in Domain Layer

Thanks to @PeterCsala’s answer, I was able to come up with a better solution that doesn’t require using an interface with static members. This approach is both cleaner and simpler. Thank you, @...
James Black's user avatar
4 votes

Implementing Generic Enumeration Classes in Domain Layer

I would rather go with extension methods to keep both the base and the derived classes as clean as possible. Base I've replaced the private sets to ...
Peter Csala's user avatar
  • 9,486

Top 50 recent answers are included