JAAvila.FluentOperations.DependencyInjection 1.5.0

dotnet add package JAAvila.FluentOperations.DependencyInjection --version 1.5.0
                    
NuGet\Install-Package JAAvila.FluentOperations.DependencyInjection -Version 1.5.0
                    
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="JAAvila.FluentOperations.DependencyInjection" Version="1.5.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="JAAvila.FluentOperations.DependencyInjection" Version="1.5.0" />
                    
Directory.Packages.props
<PackageReference Include="JAAvila.FluentOperations.DependencyInjection" />
                    
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 JAAvila.FluentOperations.DependencyInjection --version 1.5.0
                    
#r "nuget: JAAvila.FluentOperations.DependencyInjection, 1.5.0"
                    
#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 JAAvila.FluentOperations.DependencyInjection@1.5.0
                    
#: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=JAAvila.FluentOperations.DependencyInjection&version=1.5.0
                    
Install as a Cake Addin
#tool nuget:?package=JAAvila.FluentOperations.DependencyInjection&version=1.5.0
                    
Install as a Cake Tool

JAAvila.FluentOperations.DependencyInjection

Dependency Injection extensions for JAAvila.FluentOperations Quality Blueprints. Simplifies blueprint registration in IServiceCollection.

Installation

dotnet add package JAAvila.FluentOperations.DependencyInjection

Usage

Register a single blueprint

builder.Services.AddBlueprint<CreateOrderBlueprint>();

Blueprints are registered as singletons since they are stateless and reusable.

Register multiple blueprints at once

builder.Services.AddBlueprints(
    typeof(CreateOrderBlueprint),
    typeof(UpdateCustomerBlueprint),
    typeof(PaymentRequestBlueprint)
);

Register a composite blueprint

Compose N independent blueprints for the same model type T. The composite is the only IBlueprintValidator registered for T, so integration filters (AspNetCore, MediatR, gRPC) find and execute it automatically.

// Individual blueprints registered as concrete type only (NOT as IBlueprintValidator).
// The composite is registered as both its concrete type and IBlueprintValidator.
builder.Services.AddCompositeBlueprint<User>(
    typeof(NameBlueprint),
    typeof(EmailBlueprint),
    typeof(AgeBlueprint));

Or with a factory for custom resolution:

builder.Services.AddCompositeBlueprint<User>(sp =>
[
    sp.GetRequiredService<NameBlueprint>(),
    sp.GetRequiredService<EmailBlueprint>()
]);

Important: Do NOT call AddBlueprint<T>() for blueprints that are part of a composite. Doing so registers them as IBlueprintValidator, which causes filters to find the individual blueprint instead of the composite for type T.

Full example

var builder = WebApplication.CreateBuilder(args);

builder.Services
    .AddBlueprint<CreateOrderBlueprint>()
    .AddBlueprint<UpdateCustomerBlueprint>();

var app = builder.Build();
app.Run();

API Reference

Method Description
AddBlueprint<TBlueprint>() Registers a single blueprint as singleton
AddBlueprints(params Type[]) Registers multiple blueprint types as singletons
AddCompositeBlueprint<T>(params Type[]) Registers a CompositeBlueprint<T> from the given blueprint types
AddCompositeBlueprint<T>(Func<IServiceProvider, IEnumerable<IBlueprintValidator>>) Registers a CompositeBlueprint<T> using a factory

Requirements

Dependency Version
.NET 8.0+
JAAvila.FluentOperations (same major version)
Microsoft.Extensions.DependencyInjection.Abstractions 6.0.0+

License

Apache-2.0

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 was computed.  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
1.5.0 87 3/29/2026
1.3.0 83 3/26/2026
1.1.0 85 3/21/2026
1.0.1 92 3/9/2026
1.0.1-alpha.0.1 42 3/9/2026
1.0.0 81 3/8/2026