ardalis/SmartEnum
A base class for quickly and easily creating strongly typed enum replacements in C#. observed · 2026-10-07
Health v2 · maintenance only
55/100
- Activity 71
- Release rhythm 8
- Longevity 100
How is this computed?
round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10) — computed 2026-10-21. Adoption (stars, forks) is never an input.
- gap_med: n/a
- age_days: 3245
- days_rel: 700
- days_push: 174
- n_releases_24m: 1
Adoption not part of the score
2443 stars · 182 forks observed · 2026-10-07
What it is AI-extracted, prompt v1, taxonomy v1, 2026-08-30, confidence not recorded
A C# base class library for creating strongly-typed enum alternatives with behavior, lookup by name or value, and rich integration support. It ships companion packages for EF Core, Dapper, System.Text.Json, Json.NET, and AutoFixture.
Use cases
- replace C# enums with strongly typed classes
- persist smart enums with EF Core
- serialize enums as names with System.Text.Json or Json.NET
- map smart enums with Dapper
- implement value objects in domain-driven design
- look up enum instances by name or value
When to choose
- you need enums with behavior or additional properties in .NET
- you follow DDD and want type-safe value objects instead of primitive enums
- you need enum persistence and JSON serialization integrations out of the box
When to avoid
- you only need simple flags or constants with no behavior
- your project is not on .NET/C#
- you want to avoid extra dependencies for trivial enum use cases
Facets
library · maturity stable
serialization type-system orm developer-tools programming-languages backend dotnet c smart-enum enum-alternative domain-driven-design ddd value-object efcore dapper system-text-json jsonnet nuget
1 source
- readme: https://github.com/ardalis/SmartEnum · fetched 2026-10-07 · 76c23be632b2
Member repositories
| Repository | Role | Health v2 |
|---|---|---|
| ardalis/SmartEnum | main | 55 |
For agents
markdown · JSON · MCP: product_card(name="ardalis/SmartEnum")
Data as of 2026-10-19T08:05:51.212177+00:00 · Report a problem