DomAid 0.1.2

dotnet add package DomAid --version 0.1.2
                    
NuGet\Install-Package DomAid -Version 0.1.2
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="DomAid" Version="0.1.2" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="DomAid" Version="0.1.2" />
                    
Directory.Packages.props
<PackageReference Include="DomAid" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add DomAid --version 0.1.2
                    
#r "nuget: DomAid, 0.1.2"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package DomAid@0.1.2
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=DomAid&version=0.1.2
                    
Install as a Cake Addin
#tool nuget:?package=DomAid&version=0.1.2
                    
Install as a Cake Tool

DomAid is a lightweight .NET library that simplifies building clean, maintainable domain layers using DDD principles and the Mediator pattern.

DomAid

DomAid is a lightweight .NET library that simplifies building clean, maintainable domain layers using DDD principles and the Mediator pattern.

Features

  • Domain-Driven Design (DDD) Support: Facilitates the implementation of DDD patterns, including entities, value objects, and domain events.
  • Mediator Pattern Integration: Promotes loose coupling between components by implementing the Mediator pattern.
  • Infrastructure Abstractions: Provides base classes and interfaces to streamline infrastructure concerns.
  • Messaging Support: Includes components to handle messaging within the domain layer.

Prerequisites

.NET SDK installed on your machine.

Installation

You can install DomAid via NuGet:

dotnet add package DomAid

Usage

Here's a basic example of how to use DomAid in your project:


using DomAid.Domain.Entities;
using DomAid.Domain.Events;
using DomAid.Domain.Mediator;

public class Order : Entity
{
    public string OrderNumber { get; private set; }

    public Order(string orderNumber)
    {
        OrderNumber = orderNumber;
        AddDomainEvent(new OrderCreatedEvent(this));
    }
}

public class OrderCreatedEvent : IDomainEvent
{
    public Order Order { get; }

    public OrderCreatedEvent(Order order)
    {
        Order = order;
    }
}

In this example:

  • Entity is a base class provided by DomAid that includes common entity functionality.

  • IDomainEvent is an interface for domain events.

  • AddDomainEvent is a method to register domain events within the entity.

Project Structure

  • src/DomAid.Domain: Contains the core domain logic, including entities, events, infrastructure, mediator, and messaging components.

  • tests/DomAid.Domain.Tests: Includes unit tests for the domain layer.

Contributing

Contributions are welcome! Please open an issue or submit a pull request for any improvements or bug fixes.

License

This project is licensed under the MIT License. See the LICENSE file for details.

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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
0.1.2 294 6/10/2025
0.1.1 280 6/10/2025
0.1.0 144 6/6/2025