EricksonLopez.ValueObjects
dotnet-value-objects · Domain Modeling
On this page (20 sections)
1. Identity, Tier & Maturity Profile#
2. Value Proposition & Problem Solved#
Zero-allocation, immutable DDD Value Objects and multi-country fiscal satellites for modern .NET with NativeAOT, EF Core, Dapper, and System.Text.Json.
Representing monetary amounts, rates, or regional tax identifiers as raw decimals and strings causes currency-mismatch bugs and duplicated validation.
3. Quick Install#
Primary package: EricksonLopez.ValueObjects
dotnet add package EricksonLopez.ValueObjects --version 2.0.0<PackageReference Include="EricksonLopez.ValueObjects" Version="2.0.0" /><PackageVersion Include="EricksonLopez.ValueObjects" Version="2.0.0" />4. Verified Ecosystem Metrics#
Snapshot retrieved UTC: 2026-12-01
5. When to Use & When Not to Use#
When to use
- You need financial Value Objects (Money, CurrencyCode, ExchangeRate, TaxRate), Result-based validation, and Latin American fiscal satellites.
When NOT to use
- You only need single-property primitive wrappers or StrongIds—use EricksonLopez.DomainPrimitives.
6. Core Capabilities & Design Invariants#
Financial & Temporal Value Objects
Immutable struct Money arithmetic with currency safety, rounding modes, BusinessDate, DateRange, and Percentage.
Regional Fiscal Satellites
Dedicated satellite packages for Dominican Republic, Chile, Colombia, Mexico, Peru, and Argentina identifiers.
7. Included NuGet Packages & Adapters#
| Package ID | Status | NuGet / Local | TFMs | AOT Status | Downloads | Description |
|---|---|---|---|---|---|---|
| EricksonLopez.ValueObjectsPrimary | Published | v2.0.0 / v3.2.0 | netstandard2.0, net8.0, net9.0, net10.0 | AOT: Full | 597 | Pure domain Value Object infrastructure for high-performance, AOT-first DDD applications in .NET 10+. |
| EricksonLopez.ValueObjects.Fiscal.DominicanRepublic | Published | v2.0.0 / v3.2.0 | net8.0, net9.0, net10.0 | AOT: Full | 340 | Domain-Driven Design (DDD) Value Objects and compliance validators for Dominican Republic taxation (DGII, RNC, Cédula, NCF Serie B, e-CF Ley 32-23, Fiscal Periods). |
| EricksonLopez.ValueObjects.Fiscal.Argentina | Published | v2.0.0 / v3.2.0 | net8.0, net9.0, net10.0 | AOT: Full | 327 | Domain-Driven Design (DDD) Value Objects and compliance types for Argentine taxation (ARCA/AFIP, CUIT/CUIL Modulo 11, Punto de Venta, CAE/CAEA, CBU/CVU Modulo 10, RG 1415/03, RG 5616/24). |
| EricksonLopez.ValueObjects.Fiscal.Colombia | Published | v2.0.0 / v3.2.0 | net8.0, net9.0, net10.0 | AOT: Full | 327 | Domain-Driven Design (DDD) Value Objects and compliance types for Colombian taxation (DIAN, NIT Modulo 11, CUFE, CUDE, CUNE, RADIAN, DANE, CIIU). |
| EricksonLopez.ValueObjects.Fiscal.Peru | Published | v2.0.0 / v3.2.0 | net8.0, net9.0, net10.0 | AOT: Full | 316 | Domain-Driven Design (DDD) Value Objects and compliance types for Peruvian taxation (SUNAT, RUC Modulo 11, CPE Identifier Tipo-Serie-Correlativo, SPOT Detracciones, Ubigeo INEI, SIRE TaxPeriod). |
| EricksonLopez.ValueObjects.Fiscal.Chile | Published | v2.0.0 / v3.2.0 | net8.0, net9.0, net10.0 | AOT: Full | 315 | Domain-Driven Design (DDD) Value Objects and compliance types for Chilean taxation (SII, RUT Modulo 11 body and check digit 'K', DTEs 33/34/39/41/52/61, Folios, Professional Fee Withholding Law 21.133). |
| EricksonLopez.ValueObjects.Serialization.Json | Published | v2.0.0 / v3.2.0 | netstandard2.0, net8.0, net9.0, net10.0 | AOT: Full | 312 | System.Text.Json Native AOT-compatible serialization adapters for EricksonLopez.ValueObjects. |
| EricksonLopez.ValueObjects.DomainPrimitives | Published | v2.0.0 / v3.2.0 | net8.0, net9.0, net10.0 | AOT: Full | 295 | DomainPrimitives bridge and adapter layer for EricksonLopez.ValueObjects. Enables bidirectional conversion and contract compatibility between Value Objects and IDomainPrimitive contracts. |
| EricksonLopez.ValueObjects.Dapper | Published | v2.0.0 / v3.2.0 | net8.0, net9.0, net10.0 | AOT: Full | 289 | Dapper TypeHandler adapters for persistence of EricksonLopez.ValueObjects in relational databases like PostgreSQL. |
| EricksonLopez.ValueObjects.EntityFrameworkCore | Published | v2.0.0 / v3.2.0 | net8.0, net9.0, net10.0 | AOT: Full | 280 | Entity Framework Core integration for EricksonLopez.ValueObjects. Provides NativeAOT-ready ValueConverters, value comparers, and model configuration conventions for domain Value Objects. |
| EricksonLopez.ValueObjects.Fiscal.Mexico | Published | v2.0.0 / v3.2.0 | net8.0, net9.0, net10.0 | AOT: Full | 280 | Domain-Driven Design (DDD) Value Objects and compliance types for Mexican taxation (SAT, RFC con homoclave, CURP RENAPO, CFDI 4.0 FiscalUuid, Pedimento Aduanal Anexo 22, Carta Porte 3.1 IdCcp, Catálogos SAT). |
| EricksonLopez.ValueObjects.AnalyzersAnalyzer / Generator | Published | v2.0.0 / v3.2.0 | netstandard2.0 | AOT: N/A (Analyzer/Legacy) | 293 | Roslyn Analyzers enforcing DDD Value Object invariants, immutability, and safety rules. |
| EricksonLopez.ValueObjects.GeneratorsAnalyzer / Generator | Published | v2.0.0 / v3.2.0 | netstandard2.0 | AOT: N/A (Analyzer/Legacy) | 281 | Roslyn Incremental Source Generator for EricksonLopez.ValueObjects boilerplate-free creation. |
| EricksonLopez.ValueObjects.Testing | Unpublished | — / v3.2.0 | net8.0, net9.0, net10.0 | AOT: Incompatible | 0 | FsCheck property-based Arbitrary generators for EricksonLopez.ValueObjects and Dominican Republic fiscal primitives (Money, Percentage, RNC Modulo-11, Cédula Luhn). |
8. Quick Start Code Example#
Grounded in verified public APIs from EricksonLopez.ValueObjects. Compile with `<ImplicitUsings>disable</ImplicitUsings>` and explicit imports.
using System;
using EricksonLopez.Result;
using EricksonLopez.ValueObjects;
Result<Money> priceResult = Money.Create(199.99m, CurrencyCode.USD);
Result<Money> shippingResult = Money.Create(15.00m, "USD");
if (priceResult.IsSuccess && shippingResult.IsSuccess)
{
Money total = priceResult.Value + shippingResult.Value;
Console.WriteLine($"Total: {total}");
}9. Architecture & Dependency Flow#
Rendering diagram…
flowchart LR lib_value_objects["EricksonLopez.ValueObjects (L1)"] lib_domain_primitives["EricksonLopez.DomainPrimitives (L0)"] lib_value_objects --> lib_domain_primitives lib_result["EricksonLopez.Result (L0)"] lib_value_objects --> lib_result
View accessible text summary and structure
2 upstream library dependencies and 0 downstream dependent libraries verified in dependencies.json.
| Direction | Library | Tier | Relationship Kinds |
|---|---|---|---|
| Upstream | EricksonLopez.DomainPrimitives | L0 | Compile-Time, NuGet Package |
| Upstream | EricksonLopez.Result | L0 | Compile-Time, NuGet Package |
flowchart LR
lib_value_objects["EricksonLopez.ValueObjects (L1)"]
lib_domain_primitives["EricksonLopez.DomainPrimitives (L0)"]
lib_value_objects --> lib_domain_primitives
lib_result["EricksonLopez.Result (L0)"]
lib_value_objects --> lib_result10. Target Frameworks & Native AOT / Trimming Matrix#
MSBuild `.csproj` inspection across 14 packages: 11 Full, 0 Partial, 1 Incompatible, 2 NotApplicable (analyzers/generators).
| Package ID | IsAotCompatible | EnableTrimAnalyzer | Verified AOT Status | Target Frameworks |
|---|---|---|---|---|
| EricksonLopez.ValueObjects | true | true | Full | netstandard2.0, net8.0, net9.0, net10.0 |
| EricksonLopez.ValueObjects.Fiscal.DominicanRepublic | true | true | Full | net8.0, net9.0, net10.0 |
| EricksonLopez.ValueObjects.Fiscal.Argentina | true | true | Full | net8.0, net9.0, net10.0 |
| EricksonLopez.ValueObjects.Fiscal.Colombia | true | true | Full | net8.0, net9.0, net10.0 |
| EricksonLopez.ValueObjects.Fiscal.Peru | true | true | Full | net8.0, net9.0, net10.0 |
| EricksonLopez.ValueObjects.Fiscal.Chile | true | true | Full | net8.0, net9.0, net10.0 |
| EricksonLopez.ValueObjects.Serialization.Json | true | true | Full | netstandard2.0, net8.0, net9.0, net10.0 |
| EricksonLopez.ValueObjects.DomainPrimitives | true | true | Full | net8.0, net9.0, net10.0 |
| EricksonLopez.ValueObjects.Dapper | true | true | Full | net8.0, net9.0, net10.0 |
| EricksonLopez.ValueObjects.EntityFrameworkCore | true | true | Full | net8.0, net9.0, net10.0 |
| EricksonLopez.ValueObjects.Fiscal.Mexico | true | true | Full | net8.0, net9.0, net10.0 |
| EricksonLopez.ValueObjects.Analyzers | false | false | NotApplicable | netstandard2.0 |
| EricksonLopez.ValueObjects.Generators | false | false | NotApplicable | netstandard2.0 |
| EricksonLopez.ValueObjects.Testing | false | true | Incompatible | net8.0, net9.0, net10.0 |
11. Upstream Dependencies & Downstream Dependents#
Upstream Dependencies (2)
Downstream Dependents (0)
No other EricksonLopez.* libraries currently depend on this family.
12. Optional Adapters & Third-Party Integrations#
Internal Adapter Edges & Integration Packages
No optional cross-family adapter edges or integration packages are recorded for this library.
Verified External NuGet Dependencies (9)
13. Configuration & DI Registration Summary#
Verified DI & Configuration Entry Points
JsonSerializerOptionsExtensions.AddValueObjectConvertersRegisters the `ValueObjectJsonConverterFactory` in the specified `JsonSerializerOptions` to ensure that all Value Objects are correctly validated and instantiated via their domain factories during deserialization.
ValueObjectModelConfigurationExtensions.ConfigureDomainValueObjectsRegisters default EF Core value converter mappings for core domain value objects.
Key Public Types & Contracts
EricksonLopez.ValueObjects.Address (record)Represents a structured physical address composed of street, city, province, country, and postal code.
EricksonLopez.ValueObjects.Barcode (record)Represents a commercial or industrial barcode supporting GS1 Modulo-10 validated symbologies (GTIN-8, UPC-A / GTIN-12, EAN-13 / GTIN-13, retail variable-weight prefix 20–29, GTIN-14) and alphanumeric Code 128.
EricksonLopez.ValueObjects.BarcodeSymbology (enum)Identifies the detected barcode symbology for a validated `Barcode`.
EricksonLopez.ValueObjects.BatchNumber (record)Represents a manufacturing batch or production lot identifier for traceability. Normalized to uppercase. Rules: Required, 1–80 characters, uppercase alphanumeric with separators (`. _ / -`). Used by: Manufacturing, Quality Control, Inventory, Food & Beverage, Pharmaceuticals.
EricksonLopez.ValueObjects.BusinessDate (record)Represents a calendar date in a business domain without time or time zone components.
EricksonLopez.ValueObjects.Code (record)Represents a generic entity code — an uppercase alphanumeric identifier with separators. Normalized to uppercase. Rules: Required, 1–60 characters, uppercase alphanumeric with `. _ / -` separators (code pattern). Stored uppercase. Used by: ERP, Inventory, POS, SaaS, Property Management, Financial ⚠️ Usage guidance (read before using): `Code` is a deliberately generic VO for domain concepts where the ubiquitous language uses the word "code" without further specificity (e.g., a department code, a category code, a warehouse location code). If your domain concept has a more specific name, prefer a purpose-built VO: - `SKU` — product stock-keeping unit - `TenantCode` — multi-tenant identifier - `DocumentNumber` — numbered document - `ReferenceNumber` — internal reference Using `Code` when a more specific VO exists weakens the Ubiquitous Language. Only use `Code` when the concept genuinely crosses multiple domains with no specific semantic.
EricksonLopez.ValueObjects.Comment (record)Represents a collaborative comment or remark on tasks, tickets, and domain entities. Rules: Required, 1–5,000 characters. Allows standard multiline whitespace (newlines, tabs) while rejecting non-printable control characters. Used by: CRM, Project Management, Issue Tracking, Social Feeds, Approvals.
EricksonLopez.ValueObjects.CompanyName (record)Represents the legal or commercial name of a company, organization, or institution. Rules: Required, 2–180 chars, business name characters (letters, digits, spaces, `& . , ' ( ) / # @ + -`), whitespace collapsed. Used by: ERP, E-Invoicing, CRM, SaaS, Payroll, Property Management, Financial, Donations.
EricksonLopez.ValueObjects.ContactInfo (record)Represents validated corporate or customer contact channels (email, primary/secondary phone, and HTTP/HTTPS website), preventing invalid addresses and dangerous URI schemes (`javascript:`, `data:`, `file:`) from entering domain aggregates.
EricksonLopez.ValueObjects.ContentType (record)Represents a MIME content type (e.g. "application/pdf", "image/png"). Rules: 3–255 chars, lowercase media/subtype format. Used by: Document management, uploads, APIs.
EricksonLopez.ValueObjects.Country (record)Represents an ISO 3166-1 alpha-2 two-letter country code.
EricksonLopez.ValueObjects.CountryCode (record)Represents a validated ISO 3166-1 alpha-2 country code with seamless resolution to ISO alpha-3, numeric-3, and Dominican Republic DGII Formato 609 country codes via `IsoCountry`.
14. Verified Performance Benchmarks#
All verified measurements below come strictly from `BenchmarkDotNet.Artifacts` running on .NET RyuJIT (0 NativeAOT benchmark runs exist in this snapshot).
| Suite | Method | Runtime | Mean (ns) | Allocated (B) | Status |
|---|---|---|---|---|---|
| ValueObjectBenchmarks | Create_RecordStruct | .NET 10.0.10 X64 RyuJIT AVX-512F+CD+BW+DQ+VL+VBMI | 0.001 | 0 | measured |
| ValueObjectBenchmarks | Equals_Struct | .NET 10.0.10 X64 RyuJIT AVX-512F+CD+BW+DQ+VL+VBMI | 0.001 | 0 | measured |
| ValueObjectBenchmarks | Create_Struct | .NET 10.0.10 X64 RyuJIT AVX-512F+CD+BW+DQ+VL+VBMI | 0.002 | 0 | measured |
| ValueObjectBenchmarks | Equals_RecordStruct | .NET 10.0.10 X64 RyuJIT AVX-512F+CD+BW+DQ+VL+VBMI | 0.007 | 0 | measured |
| ValueObjectBenchmarks | Equals_RecordClass | .NET 10.0.10 X64 RyuJIT AVX-512F+CD+BW+DQ+VL+VBMI | 0.015 | 0 | measured |
| ValueObjectBenchmarks | Equals_Class | .NET 10.0.10 X64 RyuJIT AVX-512F+CD+BW+DQ+VL+VBMI | 0.21 | 0 | measured |
| ValueObjectBenchmarks | Create_Class | .NET 10.0.10 X64 RyuJIT AVX-512F+CD+BW+DQ+VL+VBMI | 1.977 | 24 | measured |
| ValueObjectBenchmarks | Create_RecordClass | .NET 10.0.10 X64 RyuJIT AVX-512F+CD+BW+DQ+VL+VBMI | 2.056 | 24 | measured |
| ValueObjectBenchmarks | HashCode_RecordStruct | .NET 10.0.10 X64 RyuJIT AVX-512F+CD+BW+DQ+VL+VBMI | 10.531 | 0 | measured |
| ValueObjectBenchmarks | HashCode_Struct | .NET 10.0.10 X64 RyuJIT AVX-512F+CD+BW+DQ+VL+VBMI | 10.542 | 0 | measured |
| ValueObjectBenchmarks | HashCode_Class | .NET 10.0.10 X64 RyuJIT AVX-512F+CD+BW+DQ+VL+VBMI | 11.183 | 0 | measured |
| ValueObjectBenchmarks | DictionaryLookup_RecordStruct | .NET 10.0.10 X64 RyuJIT AVX-512F+CD+BW+DQ+VL+VBMI | 12.748 | 0 | measured |
| ValueObjectBenchmarks | HashCode_RecordClass | .NET 10.0.10 X64 RyuJIT AVX-512F+CD+BW+DQ+VL+VBMI | 12.912 | 0 | measured |
| ValueObjectBenchmarks | DictionaryLookup_RecordClass | .NET 10.0.10 X64 RyuJIT AVX-512F+CD+BW+DQ+VL+VBMI | 14.725 | 0 | measured |
15. Release History & NuGet vs Repo Status#
Version lag detected: NuGet.org latest published version is v2.0.0, while local repository HEAD is at v3.2.0.
| Version | Source | Published Date | Summary |
|---|---|---|---|
| v2.0.0 ↗ | nuget | 2026-09-21 | Published EricksonLopez.ValueObjects 2.0.0 to NuGet.org. |
| v2.0.0 ↗ | github | 2026-09-21 | Ecosystem Packages in this release | Package | Version | |---------|---------| | `EricksonLopez.ValueObjects` | `2.0.0` | | `EricksonLopez.ValueObjects.Fiscal.DominicanRepublic` | `2.0.0` | | `EricksonLopez.ValueObjects.Fiscal.Chile` | `2.0.0` | | `EricksonLopez.ValueObjects.Fiscal.Colombia` | `2.0.0` | | `EricksonLopez.ValueObjects.Fiscal.Mexico` | `2.0.0` | | `EricksonLopez.ValueObjects.Fisca... |
| v1.0.0 ↗ | github | 2026-08-25 | Ecosystem Packages in this release | Package | Version | |---------|---------| | `EricksonLopez.ValueObjects` | `1.0.0` | | `EricksonLopez.ValueObjects.Fiscal.DominicanRepublic` | `1.0.0` | | `EricksonLopez.ValueObjects.Fiscal.Chile` | `1.0.0` | | `EricksonLopez.ValueObjects.Fiscal.Colombia` | `1.0.0` | | `EricksonLopez.ValueObjects.Fiscal.Mexico` | `1.0.0` | | `EricksonLopez.ValueObjects.Fisca... |
| v1.0.0 ↗ | nuget | 2026-08-25 | Published EricksonLopez.ValueObjects 1.0.0 to NuGet.org. |
16. Complementary & Related Libraries#
Libraries in the same tier, architectural layer, or directly paired via dependency edges.
17. Documentation, API Reference & Portal Links#
Conceptual Documentation (Starlight) →
Extracted XML API Reference →
18 namespaces · 220 types · 1909 members
Ecosystem Dependency Map →
Learning Center & Handbook →
Per-library conceptual Starlight pages expand in M4; API Reference pages expand in M3.2.
18. Source Repository, License & Contributing#
Released under the MIT License. All assemblies follow EricksonLopez.* build invariants: explicit imports, strong-name signing (`EricksonLopez.snk`), and ASCII author metadata (`Erickson Lopez`).
19. Troubleshooting, Pitfalls & Migration Guidance#
- Use Money.Create(...) and inspect Result.IsFailure instead of constructing default(Money); ELVO analyzers guard against uninitialized structs.
- Version lag detected: NuGet.org latest published version is v2.0.0, while local repository HEAD is at v3.2.0.
20. Quality & Verification Evidence#
- Strong-Name Signing (`EricksonLopez.snk`)
- EricksonLopez.snk
- `ImplicitUsings=disable`
- disable
- XML Documentation Extraction
- Verified (18 namespaces, 220 types, 1909 members)
- MSBuild AOT / Trim Attributes
- 11 Full / 0 Partial / 1 Incompatible / 2 N/A
- BenchmarkDotNet Artifacts
- 16 total (14 measured, 2 na_error)
Explicit Verification Boundaries & Limitations
- All verified measurements below come strictly from `BenchmarkDotNet.Artifacts` running on .NET RyuJIT (0 NativeAOT benchmark runs exist in this snapshot).
- 1 unpublished