Late4dTrain.Domain.Abstractions 1.0.1

dotnet add package Late4dTrain.Domain.Abstractions --version 1.0.1
NuGet\Install-Package Late4dTrain.Domain.Abstractions -Version 1.0.1
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="Late4dTrain.Domain.Abstractions" Version="1.0.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Late4dTrain.Domain.Abstractions --version 1.0.1
#r "nuget: Late4dTrain.Domain.Abstractions, 1.0.1"
#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.
// Install Late4dTrain.Domain.Abstractions as a Cake Addin
#addin nuget:?package=Late4dTrain.Domain.Abstractions&version=1.0.1

// Install Late4dTrain.Domain.Abstractions as a Cake Tool
#tool nuget:?package=Late4dTrain.Domain.Abstractions&version=1.0.1

Late4dTrain.Domain.Abstractions

.NET Release to Nuget NuGet version (GSoulavy.Csv.Net)

Late4dTrain.Domain.Abstractions

This library provides a set of abstractions for Domain-Driven Design elements such as Entities, Value Objects, and Aggregate Roots. These abstractions serve as the building blocks for your domain model and enforce key characteristics required by each element.

Installation

Install the library using the following command:

dotnet add package Late4dTrain.Domain.Abstractions

Usage

Here is an example of how you can use the library:


public class Customer : AggregateRoot<Guid, DomainEvent>
{
    public string Name { get; private set; }

    public Customer(string name)
    {
        Id = Guid.NewGuid();
        Name = name;
        Events.Add(new CustomerCreated(Id));
    }
}

public class CustomerCreated : DomainEvent
{
    public Guid CustomerId { get; }

    public CustomerCreated(Guid customerId)
    {
        CustomerId = customerId;
    }
}

In this example, Customer is an Aggregate Root that uses a Guid as an identifier and DomainEvent as its domain event type. When a new customer is created, a CustomerCreated is added to the list of domain events.

Entity

Entities are fundamental building blocks of domain-driven design. They are mutable objects with a consistent thread of identity. Here is a basic example of how to create an entity:

public class SampleEntity : Entity<Guid>
{
    public override Guid Id { get; protected set; } = Guid.NewGuid();

    // Additional properties and methods here...
}

In this example, SampleEntity is an entity with a unique identifier of type Guid

Value Object

Value objects are objects that we care about only because of their properties and the values those properties have. They don't have an identity, meaning two value objects with the same properties are considered equal. Here's an example:


public class SampleValueObject : IValueObject
{
    // Properties and methods here...
}

In this example, SampleValueObject is a value object.

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

License

This project is licensed under the terms of the MIT license.

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  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. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • .NETStandard 2.0

    • No dependencies.

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.1 110 6/21/2023
1.0.0 99 6/20/2023
0.0.8-pre 76 6/19/2023
0.0.7-pre 78 6/16/2023
0.0.6-pre 166 1/25/2022
0.0.5-pre 127 1/24/2022
0.0.4-pre 146 1/24/2022
0.0.3-pre 137 1/24/2022
0.0.2-pre 152 1/20/2022
0.0.1-pre 151 1/20/2022