Arcturus.AspNetCore.Endpoints 2026.8.10.345

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

Arcturus.AspNetCore.Endpoints

NuGet NuGet


Arcturus.AspNetCore.Endpoints is a .NET library that provides a flexible abstraction for defining HTTP API endpoints in ASP.NET Core applications. It enables developers to implement endpoints using a consistent pattern, supporting both synchronous and asynchronous operations, with or without request objects, and integrates seamlessly with ASP.NET Core routing and controller infrastructure.

Installation

Install the package via NuGet Package Manager or the .NET CLI:

dotnet add package Arcturus.AspNetCore.Endpoints

Or, using the Package Manager Console:

Install-Package Arcturus.AspNetCore.Endpoints

Prerequisites

  • .NET SDK 8 or later

Features

  • Abstraction for single endpoints using AbstractEndpoint base class.
  • Automatic application of [ApiController] and [Route] attributes for endpoint classes.
  • Builder pattern via EndpointsBuilder for defining endpoints with or without request objects.
  • Support for both synchronous and asynchronous endpoint handlers.
  • Flexible return types: plain results, ActionResult<T>, IActionResult, and IAsyncEnumerable<T>.
  • Endpoint definitions for:
    • Endpoints with request and response types.
    • Endpoints with request but no response.
    • Endpoints without request, with or without response.
  • Integration with ASP.NET Core controller routing using the [controller] template.
  • Clean separation of endpoint logic from controller boilerplate.
  • Extensible for custom endpoint behaviors and patterns.
  • Global endpoint conventions: Apply common conventions like RequireAuthorization(), AllowAnonymous(), WithMetadata(), etc. to all endpoints registered by a module.

Usage

Basic Endpoint Module

Implement the IEndPointModule interface to create an endpoint module:

using Arcturus.AspNetCore.Endpoints;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Routing;

public class UsersEndpointModule : IEndPointModule
{
    public void AddRoute(IEndpointRouteBuilder app)
    {
        app.MapGet("/api/users", () => "List of users");
        app.MapGet("/api/users/{id}", (int id) => $"User {id}");
    }
}

Applying Global Conventions

To apply conventions to all endpoints in a module, implement the IConfigurableEndPointModule interface:

public class SecureEndpointModule : IConfigurableEndPointModule
{
    public void AddRoute(IEndpointRouteBuilder app)
    {
        // Basic implementation - can delegate to the configurable overload
        AddRoute(app, null);
    }

    public void AddRoute(IEndpointRouteBuilder app, Action<IEndpointConventionBuilder>? configure = null)
    {
        var getEndpoint = app.MapGet("/api/secure/data", () => "Secure data");
        configure?.Invoke(getEndpoint);

        var postEndpoint = app.MapPost("/api/secure/data", (object data) => Results.Ok());
        configure?.Invoke(postEndpoint);
    }
}

Note: Modules implementing only IEndPointModule (without the configurable overload) will continue to work for backward compatibility.

Registration and Configuration

Register endpoint modules in your Program.cs:

using Arcturus.AspNetCore.Endpoints;

var builder = WebApplication.CreateBuilder(args);

// Register all endpoint modules from the calling assembly
builder.Services.AddEndpointModules();

var app = builder.Build();

// Option 1: Use endpoints without global conventions
app.UseEndpointModules();

// Option 2: Apply global authorization to all endpoints
app.UseEndpointModules(endpoint => endpoint.RequireAuthorization());

// Option 3: Apply multiple conventions
app.UseEndpointModules(endpoint =>
{
    endpoint.RequireAuthorization("AdminPolicy");
    endpoint.WithMetadata("GlobalConvention", true);
});

// Option 4: Mix authorization with specific endpoints allowing anonymous access
app.UseEndpointModules(endpoint => endpoint.RequireAuthorization());
// Individual modules can still override by adding .AllowAnonymous() to specific endpoints

app.Run();

Documentation

For detailed documentation, visit Arcturus Wiki.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Support

If you encounter issues or have questions, please file an issue on the GitHub Issues page.

Product Compatible and additional computed target framework versions.
.NET 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.

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
2026.8.10.345 81 8/10/2026
2026.6.11.331 171 6/11/2026
2026.6.11.330 110 6/11/2026
2026.6.11.329 109 6/11/2026
2026.6.11.327 111 6/11/2026
2026.6.11.325 125 6/11/2026
2026.6.10.323 110 6/10/2026
2026.6.9.322 119 6/9/2026
2026.6.9.321 111 6/9/2026
2026.4.14.320 135 4/14/2026
2026.4.14.318 114 4/14/2026
2026.3.15.316 132 3/15/2026
2026.3.12.308 133 3/12/2026
2026.3.11.295 126 3/11/2026
2026.3.11.291 125 3/11/2026
2026.3.9.275 118 3/9/2026
2026.3.9.271 121 3/9/2026
2026.3.9.269 118 3/9/2026
2026.3.7.268 114 3/7/2026
2026.2.26.266 144 2/26/2026
Loading failed