Pandatech.FluentMinimalApiMapper 4.0.0

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

Pandatech.FluentMinimalApiMapper

A lightweight helper for auto-discovering and registering Minimal API endpoints across assemblies. Define IEndpoint, call two methods in Program.cs, and every endpoint in your project is wired up automatically.

Inspired by Carter's routing concept but stripped to the essentials — no dependencies beyond ASP.NET Core itself.

Targets net8.0, net9.0, and net10.0.


Table of Contents

  1. Features
  2. Installation
  3. Getting Started
  4. Multiple Assemblies
  5. Route Grouping

Features

  • Auto-discovers all IEndpoint implementations at startup via reflection — once, not per request
  • Works across multiple assemblies for modular monolith and vertical slice layouts
  • TryAddEnumerable registration prevents duplicates if the same assembly is scanned more than once
  • No configuration required, no base classes, no attributes

Installation

dotnet add package Pandatech.FluentMinimalApiMapper

Getting Started

1. Define an endpoint

public class ProductEndpoints : IEndpoint
{
    public void AddRoutes(IEndpointRouteBuilder app)
    {
        app.MapGet("/products", () => Results.Ok());
        app.MapPost("/products", () => Results.Created());
    }
}

2. Register and map in Program.cs

builder.AddMinimalApis(); // scans entry assembly by default

var app = builder.Build();

app.MapMinimalApis();
app.Run();

That's all. Every IEndpoint implementation in the entry assembly is discovered and registered automatically.


Multiple Assemblies

Pass any number of assemblies explicitly — useful in modular monolith setups where each module lives in its own project:

builder.AddMinimalApis(
    typeof(ProductEndpoints).Assembly,
    typeof(OrderEndpoints).Assembly);

Route Grouping

Pass a RouteGroupBuilder to MapMinimalApis to apply shared configuration (prefix, auth policy, filters, etc.) to all discovered endpoints at once:

var api = app.MapGroup("/api/v1").RequireAuthorization();
app.MapMinimalApis(api);

Or apply multiple group configurations selectively by calling MapMinimalApis more than once with different groups, scanning different assemblies each time.


License

MIT

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 is compatible.  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.
  • net10.0

    • No dependencies.
  • net8.0

    • No dependencies.
  • net9.0

    • No dependencies.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on Pandatech.FluentMinimalApiMapper:

Package Downloads
Pandatech.SharedKernel

Opinionated ASP.NET Core 10 infrastructure kernel: OpenAPI (Swagger + Scalar), Serilog, MediatR, FluentValidation, CORS, SignalR, OpenTelemetry, health checks, maintenance mode, resilience pipelines, and shared utilities.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
4.0.0 115 2/28/2026
3.0.1 142 1/26/2026
3.0.0 117 12/28/2025
2.0.4 373 8/7/2025
2.0.3 295 6/1/2025
2.0.2 273 2/17/2025
2.0.1 319 11/21/2024
2.0.0 192 11/18/2024
1.1.0 281 3/24/2024
1.0.0 219 3/23/2024

Multi-target net8.0/net9.0/net10.0, switched to FrameworkReference