AdCodicem.ValueObjects
0.3.0
Prefix Reserved
dotnet add package AdCodicem.ValueObjects --version 0.3.0
NuGet\Install-Package AdCodicem.ValueObjects -Version 0.3.0
<PackageReference Include="AdCodicem.ValueObjects" Version="0.3.0" />
<PackageVersion Include="AdCodicem.ValueObjects" Version="0.3.0" />
<PackageReference Include="AdCodicem.ValueObjects" />
paket add AdCodicem.ValueObjects --version 0.3.0
#r "nuget: AdCodicem.ValueObjects, 0.3.0"
#:package AdCodicem.ValueObjects@0.3.0
#addin nuget:?package=AdCodicem.ValueObjects&version=0.3.0
#tool nuget:?package=AdCodicem.ValueObjects&version=0.3.0
AdCodicem.ValueObjects
An answer to primitive obsession for .NET 10 and later: single-value DDD value objects, generated at compile time, with no reflection and no allocation on the paths that matter. This is the package to install: it brings the source generator, its analyzers and code fixes, and the abstractions the generated code implements.
dotnet add package AdCodicem.ValueObjects
A readonly partial struct marked [ValueObject<T>] gets its whole implementation: construction that normalizes, then
validates, then assigns, so that an instance is valid by construction; equality, comparison, parsing and formatting;
and a JSON converter and a type converter, through which it crosses every boundary as its underlying type.
using AdCodicem.ValueObjects;
using AdCodicem.ValueObjects.Annotations;
namespace Shop;
[ValueObject<string>(MinLength = 3, MaxLength = 12)]
public readonly partial struct Sku;
public static class Catalogue
{
public static Sku Parse(string text) => Sku.Create(text);
public static bool TryRead(string text, out Sku sku) => Sku.TryCreate(text, out sku);
}
Its rules are declared once, and reach JSON, EF Core, model binding, the OpenAPI document and every other integration through the packages of the same name.
- Documentation: https://adcodicem.github.io/AdCodicem.ValueObjects/
- Every released package, and what each integrates: https://adcodicem.github.io/AdCodicem.ValueObjects/docs/packages
- Every package of the next version, previews included: https://adcodicem.github.io/AdCodicem.ValueObjects/docs/preview/packages
- Changes: https://github.com/AdCodicem/AdCodicem.ValueObjects/blob/main/CHANGELOG.md
- Source and issues: https://github.com/AdCodicem/AdCodicem.ValueObjects
Learn more about Target Frameworks and .NET Standard.
-
net10.0
- AdCodicem.ValueObjects.Abstractions (>= 0.3.0)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on AdCodicem.ValueObjects:
| Package | Downloads |
|---|---|
|
AdCodicem.ValueObjects.Identifiers
Stripe-style public entity identifiers as value objects. Annotate a readonly partial struct with [EntityId("acc")] and get a prefixed, fixed-width, index-friendly identifier with a check character, generated with no reflection and no allocation beyond the value itself. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.3.0 | 137 | 10/29/2026 |
| 0.3.0-preview.425 | 75 | 10/27/2026 |
| 0.3.0-preview.322 | 145 | 10/19/2026 |
| 0.3.0-preview.283 | 95 | 10/12/2026 |
| 0.3.0-preview.248 | 78 | 10/5/2026 |
| 0.3.0-preview.205 | 75 | 10/4/2026 |
| 0.3.0-preview.197 | 82 | 10/3/2026 |
| 0.2.2-preview.0.172 | 80 | 10/3/2026 |
| 0.2.2-preview.0.144 | 64 | 10/2/2026 |
| 0.2.2-preview.0.143 | 72 | 10/2/2026 |
| 0.2.2-preview.0.138 | 79 | 10/2/2026 |
| 0.2.2-preview.0.137 | 75 | 10/2/2026 |
| 0.2.2-preview.0.136 | 72 | 10/2/2026 |
| 0.2.2-preview.0.135 | 69 | 10/1/2026 |
| 0.2.2-preview.0.100 | 64 | 10/1/2026 |
| 0.2.2-preview.0.2 | 67 | 9/30/2026 |
| 0.2.2-preview.0.1 | 79 | 9/30/2026 |
| 0.2.1 | 277 | 9/30/2026 |
| 0.2.1-preview.0.12 | 74 | 9/30/2026 |
| 0.2.1-preview.0.11 | 71 | 9/30/2026 |