Can SmartEnum support collections of enums?
- Dominant language
- C#
- Stars
- 2.4k
- Forks
- 184
- PR merge metrics
- No merged PRs in 30d
Description
I have a situation where I have a property in the base object of my model that is a collection of enums.
Example:
Base object is Person. A person has a collection of Sports objects, for sports they play. They can play more than one sport. Let's assume it's an open enum, with several "known" sports, but with the ability to expand to additional sports that one might play. And just for completion, sports can have more than one person that plays them, so it's a true many-to-many scenario.
How would I use SmartEnum to model this and also persist to database through EFCore?
Thanks!
Contributor guide
Research direction
The issue names no files, tests, or entry points; begin by reviewing the SmartEnum and EFCore integration relevant to collection-valued enums and the Person/Sports many-to-many example. Done would be a documented, verified way to model and persist that scenario, or a clearly scoped support decision.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- databases
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100