ardalis/SmartEnum
This system is a .NET library that provides a strongly-typed, object-oriented alternative to standard C# enums, supporting both single and flag-based enumeration patterns. It offers deep integration with common .NET data access and serialization frameworks, including Entity Framework Core, Dapper, ASP.NET Core model binding, and multiple JSON/MessagePack/Protobuf serializers. The library also includes utilities for testing, guard clauses, and specific exception handling to ensure robust usage across different application layers.
47.8
Weak · 3 August 2026
5.2k
lines of production code
C#
primary language
1
bus factor · 50 authors in all
3
measurements over time
How it got here
2017–2018 · Serialization and integration expansion
This period focused on expanding the SmartEnum library's ecosystem by adding integration packages for AutoFixture, GuardClauses, and various serialization formats including JSON, Protobuf, and MessagePack. The work also introduced specific exception types for better error handling and reorganized the repository structure to support multi-targeting and consistent code formatting.
7 changes
2020 · System.Text.Json integration and test expansion
This period focused on adding System.Text.Json serialization support for SmartEnums and SmartFlagEnums, introducing new converters for name and value-based serialization. Concurrently, the test suite was expanded to cover these new features and to validate serialization across multiple libraries including JsonNet, Utf8Json, MessagePack, and ProtoBuf.
8 changes
2021–2024 · ORM and framework integrations
This period focused on expanding SmartEnum's compatibility with major .NET data access and web frameworks, specifically adding support for Entity Framework Core, Dapper, and ASP.NET Core model binding. The work included implementing automatic type conversion, model binding, and type handlers, while simultaneously establishing comprehensive unit and integration test suites to verify these new integrations.
8 changes
Survey your own repository
ardalis/SmartEnum was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point the surveyor at a repository you know and see whether you agree with it.
About this page
- The description of this project is derived from its own commit history, not from its README.
- The score is its highest published measurement, taken on 3 August 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
- Measured at commit 9bc3f7a430 — the exact code this score is about.
- Scored under rubric rubric-2026.08.18. Score the same commit under that rubric and you get the same number.