UnitGenerator
C# Source Generator to create value-object, inspired by units of measure. (by Cysharp)
StronglyTypedId
A Rosyln-powered generator for strongly-typed IDs (by andrewlock)

Nutrient – The #1 PDF SDK Library, trusted by 10K+ developers
Other PDF SDKs promise a lot - then break. Laggy scrolling, poor mobile UX, tons of bugs, and lack of support cost you endless frustrations. Nutrient’s SDK handles billion-page workloads - so you don’t have to debug PDFs. Used by ~1 billion end users in more than 150 different countries.
www.nutrient.io
featured
UnitGenerator | StronglyTypedId | |
---|---|---|
2 | 4 | |
355 | 1,591 | |
1.4% | 0.4% | |
5.5 | 6.1 | |
2 months ago | 22 days ago | |
C# | C# | |
MIT License | MIT License |
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
UnitGenerator
Posts with mentions or reviews of UnitGenerator.
We have used some of these posts to build our list of alternatives
and similar projects. The last one was on 2023-06-20.
-
what do you find most frustrating about dotnet?
You either have to do it manually or use a code generator (there are nugets for that, for example: https://github.com/Cysharp/UnitGenerator), but you absolutely can.
-
.NET 7 Preview 5 - Generic Math
You might wanna take a look at https://github.com/Cysharp/UnitGenerator we've used it on some of our systems at work and works pretty well overall as Value Objects.
StronglyTypedId
Posts with mentions or reviews of StronglyTypedId.
We have used some of these posts to build our list of alternatives
and similar projects. The last one was on 2022-12-03.
-
A Better Way to Handle Entity Identification in .NET with Strongly Typed IDs
using StronglyTypedId package written by Andrew Lock
-
User IDs probably shouldn't be passed around as ints
> Is it just user-ids we should discuss or is it all kind of ids represented as an int?
Strongly typed ID’s are a thing advocated for in general [0], yes.
And they aren’t even inconvenient in some languages. Modern C# for example makes it very easy to use them [1].
[0]: https://andrewlock.net/using-strongly-typed-entity-ids-to-av...
[1]: https://github.com/andrewlock/StronglyTypedId
-
Make Strongly-Typed-Id of DDD easier in Entity Framework Core 7
I've only read through the readme but my gut reaction is that https://github.com/andrewlock/StronglyTypedId/ feels more ergonomic to me. Your project is definitely well-thought out and the documentation is excellent though!
-
.NET 7 Preview 5 - Generic Math
There is a github project StronglyTypedId which promises to support the latter kind of thing via source generation though I haven't yet tried it in practice.
What are some alternatives?
When comparing UnitGenerator and StronglyTypedId you can also consider the following projects:
vscode-csharp - Official C# support for Visual Studio Code
LessCode.EFCore.StronglyTypedId - Automatically generate Types for Strongly Typed Id in Entity Framework Core
UploadStream - high performance file upload streaming for dotnet
spec - The canonical spec for ulid
FileTypeChecker - Cross platform file type validator for .NET
csharplang - The official repo for the design of the C# programming language

Nutrient – The #1 PDF SDK Library, trusted by 10K+ developers
Other PDF SDKs promise a lot - then break. Laggy scrolling, poor mobile UX, tons of bugs, and lack of support cost you endless frustrations. Nutrient’s SDK handles billion-page workloads - so you don’t have to debug PDFs. Used by ~1 billion end users in more than 150 different countries.
www.nutrient.io
featured