Bruno57.Domain.Factory.Abstractions
1.0.0
dotnet add package Bruno57.Domain.Factory.Abstractions --version 1.0.0
NuGet\Install-Package Bruno57.Domain.Factory.Abstractions -Version 1.0.0
<PackageReference Include="Bruno57.Domain.Factory.Abstractions" Version="1.0.0" />
<PackageVersion Include="Bruno57.Domain.Factory.Abstractions" Version="1.0.0" />
<PackageReference Include="Bruno57.Domain.Factory.Abstractions" />
paket add Bruno57.Domain.Factory.Abstractions --version 1.0.0
#r "nuget: Bruno57.Domain.Factory.Abstractions, 1.0.0"
#addin nuget:?package=Bruno57.Domain.Factory.Abstractions&version=1.0.0
#tool nuget:?package=Bruno57.Domain.Factory.Abstractions&version=1.0.0
Bruno57.Domain.Factory.Abstractions
Overview
Bruno57.Domain.Factory.Abstraction is the contract package for Bruno57.Domain.Factory, defining the core interface and configuration structures used to support factory-based entity creation in a Domain-Driven Design (DDD) architecture.
This package is ideal for applications or libraries that want to depend on abstractions without coupling to any specific factory implementation.
Installation
dotnet add package Bruno57.Domain.Factory.Abstraction
✅ Supports .NET 8 and .NET 9
🔧 What’s Included
This package contains the following key elements:
✅ IDomainFactory<TRequest, TResponse>
A generic interface that defines the contract for creating domain entity objects in a configurable way.
public interface IDomainFactory<in TRequest, out TResponse>
where TRequest : class
where TResponse : EntityBase
{
TResponse? CreateEntityObject(TRequest request, [Optional] Action<DomainFactoryOption> action);
}
- TRequest: Input request object, typically a command or DTO.
- TResponse: A domain entity that inherits from EntityBase.
- Optional DomainFactoryOption: Allows the caller to influence how the object is constructed.
DomainFactoryOption
A flexible configuration object that lets consumers:
- Ignore specific properties from the request object.
- Inject additional properties into the creation process.
- Customise how the factory interprets the input data.
Example:
option.IgnoreProperties(["PropertyA", "PropertyB"]);
option.AddProperties(new Dictionary<string, object>
{
{ "SomeNewProperty", 123 },
{ "CreatedOn", DateTime.UtcNow }
}.ToImmutableDictionary());
Why Use the Abstractions Package?
This package follows the dependency inversion principle, allowing application layers to depend on abstractions — not implementations.
Use Ghanavats.Domain.Factory.Abstraction when:
- You want to mock or stub the factory for unit testing.
- You are building your own custom factory implementation.
- You want to decouple your application logic from the Domain.Factory implementation.
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. |
-
net8.0
- Bruno57.Domain.Foundations (>= 1.0.3)
-
net9.0
- Bruno57.Domain.Foundations (>= 1.0.3)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Bruno57.Domain.Factory.Abstractions:
Package | Downloads |
---|---|
Bruno57.Domain.Factory
A lightweight .NET library that implements the Factory pattern in line with Domain-Driven Design (DDD) principles. Bruno57.Domain.Factory enables the creation of complex entities and aggregates through a configurable, reflection-based factory mechanism. Supports customisation via options to ignore or inject properties. Designed to enforce consistency, encapsulate construction logic, and reduce boilerplate in your domain layer. |
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
1.0.0 | 199 | 5/12/2025 |