EricksonLopez.ValueObjects

dotnet-value-objects · Domain Modeling

On this page (20 sections)

1. Identity, Tier & Maturity Profile#

L1 Domain & Query ModelingStableMaintenance: ActiveAOT: PartialMIT LicenseConfidence: HIGH
Domainnetstandard2.0net8.0net9.0net10.0

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
Also published in this family:
EricksonLopez.ValueObjects.Fiscal.DominicanRepublicEricksonLopez.ValueObjects.Fiscal.ArgentinaEricksonLopez.ValueObjects.Fiscal.ColombiaEricksonLopez.ValueObjects.Fiscal.PeruEricksonLopez.ValueObjects.Fiscal.ChileEricksonLopez.ValueObjects.Serialization.Json

4. Verified Ecosystem Metrics#

v2.0.0
NuGet Published Version
v3.2.0
Repo HEAD Version
4,252
NuGet Downloads
14
Packable Packages
1,909
Public API Members
16
Benchmark Rows (RyuJIT)

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 IDStatusNuGet / LocalTFMsAOT StatusDownloadsDescription
EricksonLopez.ValueObjectsPrimaryPublishedv2.0.0 / v3.2.0netstandard2.0, net8.0, net9.0, net10.0AOT: Full597Pure domain Value Object infrastructure for high-performance, AOT-first DDD applications in .NET 10+.
EricksonLopez.ValueObjects.Fiscal.DominicanRepublicPublishedv2.0.0 / v3.2.0net8.0, net9.0, net10.0AOT: Full340Domain-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.ArgentinaPublishedv2.0.0 / v3.2.0net8.0, net9.0, net10.0AOT: Full327Domain-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.ColombiaPublishedv2.0.0 / v3.2.0net8.0, net9.0, net10.0AOT: Full327Domain-Driven Design (DDD) Value Objects and compliance types for Colombian taxation (DIAN, NIT Modulo 11, CUFE, CUDE, CUNE, RADIAN, DANE, CIIU).
EricksonLopez.ValueObjects.Fiscal.PeruPublishedv2.0.0 / v3.2.0net8.0, net9.0, net10.0AOT: Full316Domain-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.ChilePublishedv2.0.0 / v3.2.0net8.0, net9.0, net10.0AOT: Full315Domain-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.JsonPublishedv2.0.0 / v3.2.0netstandard2.0, net8.0, net9.0, net10.0AOT: Full312System.Text.Json Native AOT-compatible serialization adapters for EricksonLopez.ValueObjects.
EricksonLopez.ValueObjects.DomainPrimitivesPublishedv2.0.0 / v3.2.0net8.0, net9.0, net10.0AOT: Full295DomainPrimitives bridge and adapter layer for EricksonLopez.ValueObjects. Enables bidirectional conversion and contract compatibility between Value Objects and IDomainPrimitive contracts.
EricksonLopez.ValueObjects.DapperPublishedv2.0.0 / v3.2.0net8.0, net9.0, net10.0AOT: Full289Dapper TypeHandler adapters for persistence of EricksonLopez.ValueObjects in relational databases like PostgreSQL.
EricksonLopez.ValueObjects.EntityFrameworkCorePublishedv2.0.0 / v3.2.0net8.0, net9.0, net10.0AOT: Full280Entity Framework Core integration for EricksonLopez.ValueObjects. Provides NativeAOT-ready ValueConverters, value comparers, and model configuration conventions for domain Value Objects.
EricksonLopez.ValueObjects.Fiscal.MexicoPublishedv2.0.0 / v3.2.0net8.0, net9.0, net10.0AOT: Full280Domain-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 / GeneratorPublishedv2.0.0 / v3.2.0netstandard2.0AOT: N/A (Analyzer/Legacy)293Roslyn Analyzers enforcing DDD Value Object invariants, immutability, and safety rules.
EricksonLopez.ValueObjects.GeneratorsAnalyzer / GeneratorPublishedv2.0.0 / v3.2.0netstandard2.0AOT: N/A (Analyzer/Legacy)281Roslyn Incremental Source Generator for EricksonLopez.ValueObjects boilerplate-free creation.
EricksonLopez.ValueObjects.TestingUnpublished— / v3.2.0net8.0, net9.0, net10.0AOT: Incompatible0FsCheck 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#

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
EricksonLopez.ValueObjects Dependency Topology2 upstream library dependencies and 0 downstream dependent libraries verified in dependencies.json.
View accessible text summary and structure

2 upstream library dependencies and 0 downstream dependent libraries verified in dependencies.json.

DirectionLibraryTierRelationship Kinds
UpstreamEricksonLopez.DomainPrimitivesL0Compile-Time, NuGet Package
UpstreamEricksonLopez.ResultL0Compile-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_result

10. Target Frameworks & Native AOT / Trimming Matrix#

MSBuild `.csproj` inspection across 14 packages: 11 Full, 0 Partial, 1 Incompatible, 2 NotApplicable (analyzers/generators).

Package IDIsAotCompatibleEnableTrimAnalyzerVerified AOT StatusTarget Frameworks
EricksonLopez.ValueObjectstruetrueFullnetstandard2.0, net8.0, net9.0, net10.0
EricksonLopez.ValueObjects.Fiscal.DominicanRepublictruetrueFullnet8.0, net9.0, net10.0
EricksonLopez.ValueObjects.Fiscal.ArgentinatruetrueFullnet8.0, net9.0, net10.0
EricksonLopez.ValueObjects.Fiscal.ColombiatruetrueFullnet8.0, net9.0, net10.0
EricksonLopez.ValueObjects.Fiscal.PerutruetrueFullnet8.0, net9.0, net10.0
EricksonLopez.ValueObjects.Fiscal.ChiletruetrueFullnet8.0, net9.0, net10.0
EricksonLopez.ValueObjects.Serialization.JsontruetrueFullnetstandard2.0, net8.0, net9.0, net10.0
EricksonLopez.ValueObjects.DomainPrimitivestruetrueFullnet8.0, net9.0, net10.0
EricksonLopez.ValueObjects.DappertruetrueFullnet8.0, net9.0, net10.0
EricksonLopez.ValueObjects.EntityFrameworkCoretruetrueFullnet8.0, net9.0, net10.0
EricksonLopez.ValueObjects.Fiscal.MexicotruetrueFullnet8.0, net9.0, net10.0
EricksonLopez.ValueObjects.AnalyzersfalsefalseNotApplicablenetstandard2.0
EricksonLopez.ValueObjects.GeneratorsfalsefalseNotApplicablenetstandard2.0
EricksonLopez.ValueObjects.TestingfalsetrueIncompatiblenet8.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)

DapperFsCheckMicrosoft.Bcl.HashCodeMicrosoft.Bcl.TimeProviderMicrosoft.EntityFrameworkCorePortable.System.DateTimeOnlySystem.MemorySystem.Runtime.CompilerServices.UnsafeSystem.Text.Json

13. Configuration & DI Registration Summary#

Verified DI & Configuration Entry Points

  • JsonSerializerOptionsExtensions.AddValueObjectConverters

    Registers the `ValueObjectJsonConverterFactory` in the specified `JsonSerializerOptions` to ensure that all Value Objects are correctly validated and instantiated via their domain factories during deserialization.

  • ValueObjectModelConfigurationExtensions.ConfigureDomainValueObjects

    Registers 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).

Total rows: 16 · Measured: 14 · NA / Error: 2 · Suites: 2

Observed runtimes: .NET 10.0.10 X64 RyuJIT AVX-512F+CD+BW+DQ+VL+VBMI · .NET 10.0.11 X64 RyuJIT x86-64-v4

Observed CPUs: AMD Ryzen 7 9800X3D 4.70GHz, 1 CPU, 8 logical and 8 physical cores · Unknown processor

SuiteMethodRuntimeMean (ns)Allocated (B)Status
ValueObjectBenchmarksCreate_RecordStruct.NET 10.0.10 X64 RyuJIT AVX-512F+CD+BW+DQ+VL+VBMI0.0010measured
ValueObjectBenchmarksEquals_Struct.NET 10.0.10 X64 RyuJIT AVX-512F+CD+BW+DQ+VL+VBMI0.0010measured
ValueObjectBenchmarksCreate_Struct.NET 10.0.10 X64 RyuJIT AVX-512F+CD+BW+DQ+VL+VBMI0.0020measured
ValueObjectBenchmarksEquals_RecordStruct.NET 10.0.10 X64 RyuJIT AVX-512F+CD+BW+DQ+VL+VBMI0.0070measured
ValueObjectBenchmarksEquals_RecordClass.NET 10.0.10 X64 RyuJIT AVX-512F+CD+BW+DQ+VL+VBMI0.0150measured
ValueObjectBenchmarksEquals_Class.NET 10.0.10 X64 RyuJIT AVX-512F+CD+BW+DQ+VL+VBMI0.210measured
ValueObjectBenchmarksCreate_Class.NET 10.0.10 X64 RyuJIT AVX-512F+CD+BW+DQ+VL+VBMI1.97724measured
ValueObjectBenchmarksCreate_RecordClass.NET 10.0.10 X64 RyuJIT AVX-512F+CD+BW+DQ+VL+VBMI2.05624measured
ValueObjectBenchmarksHashCode_RecordStruct.NET 10.0.10 X64 RyuJIT AVX-512F+CD+BW+DQ+VL+VBMI10.5310measured
ValueObjectBenchmarksHashCode_Struct.NET 10.0.10 X64 RyuJIT AVX-512F+CD+BW+DQ+VL+VBMI10.5420measured
ValueObjectBenchmarksHashCode_Class.NET 10.0.10 X64 RyuJIT AVX-512F+CD+BW+DQ+VL+VBMI11.1830measured
ValueObjectBenchmarksDictionaryLookup_RecordStruct.NET 10.0.10 X64 RyuJIT AVX-512F+CD+BW+DQ+VL+VBMI12.7480measured
ValueObjectBenchmarksHashCode_RecordClass.NET 10.0.10 X64 RyuJIT AVX-512F+CD+BW+DQ+VL+VBMI12.9120measured
ValueObjectBenchmarksDictionaryLookup_RecordClass.NET 10.0.10 X64 RyuJIT AVX-512F+CD+BW+DQ+VL+VBMI14.7250measured

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.

VersionSourcePublished DateSummary
v2.0.0 ↗nuget2026-09-21Published EricksonLopez.ValueObjects 2.0.0 to NuGet.org.
v2.0.0 ↗github2026-09-21Ecosystem 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 ↗github2026-08-25Ecosystem 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 ↗nuget2026-08-25Published EricksonLopez.ValueObjects 1.0.0 to NuGet.org.

Libraries in the same tier, architectural layer, or directly paired via dependency edges.

17. Documentation, API Reference & Portal Links#

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

Search EricksonLopez.* Ecosystem

Type a library name, NuGet package ID, .NET type, or architectural concept to search across the portal.