DomAid 0.1.2
dotnet add package DomAid --version 0.1.2
NuGet\Install-Package DomAid -Version 0.1.2
<PackageReference Include="DomAid" Version="0.1.2" />
<PackageVersion Include="DomAid" Version="0.1.2" />
<PackageReference Include="DomAid" />
paket add DomAid --version 0.1.2
#r "nuget: DomAid, 0.1.2"
#:package DomAid@0.1.2
#addin nuget:?package=DomAid&version=0.1.2
#tool nuget:?package=DomAid&version=0.1.2
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 | Versions 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. |
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.