GreatUtilities.Vogen
This package contains a Souce Generator which generates Value Objects that wrap simple primitives such as int, string, double etc. A ValueObject is a strongly typed (strongly, not stringly) domain object that is immutable. Instead of `int customerId = 42;` we have `var customerId = CustomerId.From(42);` To use, just create something like this: [ValueObject(typeof(int))] public partial struct CustomerId { } var customerId = CustomerId.From(42); Validation is in just one place. You can't introduce bad objects into your domain, therefore you can assume that in your domain every ValueObject is valid.
Activity
- Latest release
- 1y ago
- Total releases
- 1
- Cadence
- —
- Last 12 months
- 0
Details
- License
- Apache-2.0
- First release
- Jun 05, 2025