BeyondNetCode.Shell.Ddd.ValueObjects
1.0.0
dotnet add package BeyondNetCode.Shell.Ddd.ValueObjects --version 1.0.0
NuGet\Install-Package BeyondNetCode.Shell.Ddd.ValueObjects -Version 1.0.0
<PackageReference Include="BeyondNetCode.Shell.Ddd.ValueObjects" Version="1.0.0" />
<PackageVersion Include="BeyondNetCode.Shell.Ddd.ValueObjects" Version="1.0.0" />
<PackageReference Include="BeyondNetCode.Shell.Ddd.ValueObjects" />
paket add BeyondNetCode.Shell.Ddd.ValueObjects --version 1.0.0
#r "nuget: BeyondNetCode.Shell.Ddd.ValueObjects, 1.0.0"
#:package BeyondNetCode.Shell.Ddd.ValueObjects@1.0.0
#addin nuget:?package=BeyondNetCode.Shell.Ddd.ValueObjects&version=1.0.0
#tool nuget:?package=BeyondNetCode.Shell.Ddd.ValueObjects&version=1.0.0
<div align="center"> <h1>BeyondNet.Ddd</h1> <p><strong>A Domain-Driven Design (DDD) library for .NET</strong></p>
<p> <a href="README.en.md">🇬🇧 English</a> | <a href="README.es.md">🇪🇸 Español</a> </p>
<p> <a href="https://www.nuget.org/profiles/BeyondNetCode"> <img src="https://img.shields.io/badge/NuGet-BeyondNetCode-blue" alt="NuGet" /> </a> <a href="https://github.com/beyondnetcode/Shell.ddd/actions"> <img src="https://github.com/beyondnetcode/Shell.ddd/workflows/CI%20/%20CD/badge.svg" alt="Build" /> </a> </p> </div>
Welcome to BeyondNet.Ddd! A library for implementing Domain-Driven Design patterns in .NET with clean, maintainable code.
Installation
NuGet Packages
# Core DDD library
dotnet add package BeyondNetCode.Shell.Ddd
# Value Objects
dotnet add package BeyondNetCode.Shell.Ddd.ValueObjects
# AutoMapper integration
dotnet add package BeyondNetCode.Shell.Ddd.AutoMapper
Packages Overview
| Package | Description | NuGet |
|---|---|---|
BeyondNetCode.Shell.Ddd |
Core DDD abstractions (Entity, AggregateRoot, DomainEvents, Rules) | link |
BeyondNetCode.Shell.Ddd.ValueObjects |
Pre-built value objects (IdValueObject, AuditValueObject, Validators) | link |
BeyondNetCode.Shell.Ddd.AutoMapper |
AutoMapper integration for DDD entities | link |
Features
- Entity Base Class: Full-featured entity implementation with tracking, validation, and business rules
- Aggregate Root: Specialized entity for aggregate roots with domain events support
- Value Objects: Immutable value objects with built-in validation
- Business Rules: Rule engine with
BrokenRulesManagerfor domain validation - Property Change Tracking: INotifyPropertyChanged implementation with change tracking
- AutoMapper Integration: Seamless mapping between DTOs and domain entities
- MediatR Integration: Built-in support for domain events via MediatR
Quick Start
Define an Entity
public class SampleName : ValueObject<SampleName>
{
public string Value { get; }
public SampleName(string value)
{
if (string.IsNullOrWhiteSpace(value))
throw new ArgumentNullException(nameof(value));
Value = value;
}
protected override IEnumerable<object> GetEqualityComponents()
{
yield return Value;
}
}
public class SampleEntityProps : IProps
{
public SampleName Name { get; set; }
}
public class SampleEntity : Entity<SampleEntity, SampleEntityProps>
{
public SampleEntity(SampleEntityProps props) : base(props)
{
}
public static SampleEntity Create(string name)
{
var props = new SampleEntityProps { Name = new SampleName(name) };
return new SampleEntity(props);
}
public override void AddValidators()
{
ValidatorRules.Add(new SampleNameValidator());
}
}
Define an Aggregate Root with Domain Events
public class SampleCreatedDomainEvent : DomainEvent
{
public Guid EntityId { get; }
public string Name { get; }
public SampleCreatedDomainEvent(Guid entityId, string name)
{
EntityId = entityId;
Name = name;
}
}
public class SampleAggregateRootProps : IProps
{
public SampleName Name { get; set; }
}
public class SampleAggregateRoot : AggregateRoot<SampleAggregateRoot, SampleAggregateRootProps>
{
public SampleAggregateRoot(SampleAggregateRootProps props) : base(props)
{
}
public static SampleAggregateRoot Create(string name)
{
var props = new SampleAggregateRootProps { Name = new SampleName(name) };
var entity = new SampleAggregateRoot(props);
entity.DomainEvents.Add(new SampleCreatedDomainEvent(entity.Id.Value, name));
return entity;
}
}
Use with AutoMapper
// Configure AutoMapper
var config = new MapperConfiguration(cfg =>
{
cfg.AddProfile<ParentRootProfile>();
});
var mapper = new Mapper(config);
// Map DTO to Entity
var dto = new SampleEntityDto { Id = "1", Name = "test" };
var props = mapper.Map<SampleEntityProps>(dto);
var entity = new SampleEntity(props);
Documentation
For detailed documentation, see the language-specific README files:
Migration from Ums.Shell.Ddd
If you were using Ums.Shell.Ddd, update your NuGet references:
# Before (Ums.Shell.Ddd)
dotnet add package Ums.Shell.Ddd
# After (BeyondNetCode.Shell.Ddd)
dotnet add package BeyondNetCode.Shell.Ddd
Update namespaces in your code:
// Before
using Ums.Shell.Ddd;
// After
using BeyondNetCode.Shell.Ddd;
Contributing
See CONTRIBUTING.md for GitFlow workflow, commit conventions, and coding standards.
Versioning
See VERSIONING.md for SemVer strategy and release process.
License
Licensed under the MIT License. See LICENSE for details.
Acknowledgments
See DISCLAIMER.md for original code authorship attribution.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- BeyondNetCode.Shell.Ddd (>= 1.0.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.0.0 | 39 | 5/30/2026 |