NocturnalGroup.SimpleEndpoints 1.0.0-preview.1

This is a prerelease version of NocturnalGroup.SimpleEndpoints.
There is a newer prerelease version of this package available.
See the version list below for details.
dotnet add package NocturnalGroup.SimpleEndpoints --version 1.0.0-preview.1                
NuGet\Install-Package NocturnalGroup.SimpleEndpoints -Version 1.0.0-preview.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="NocturnalGroup.SimpleEndpoints" Version="1.0.0-preview.1" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add NocturnalGroup.SimpleEndpoints --version 1.0.0-preview.1                
#r "nuget: NocturnalGroup.SimpleEndpoints, 1.0.0-preview.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 NocturnalGroup.SimpleEndpoints as a Cake Addin
#addin nuget:?package=NocturnalGroup.SimpleEndpoints&version=1.0.0-preview.1&prerelease

// Install NocturnalGroup.SimpleEndpoints as a Cake Tool
#tool nuget:?package=NocturnalGroup.SimpleEndpoints&version=1.0.0-preview.1&prerelease                

<img align="right" width="256" height="256" src="Assets/Logo.png">

<div id="user-content-toc"> <ul align="center" style="list-style: none;"> <summary> <h1>SimpleEndpoints</h1> </summary> </ul> </div>

Adding structure to Minimal APIs


SimpleEndpoints is a lightweight abstraction on top of Minimal APIs. Allowing you to create endpoints with ease.

Installing

You can install the package from NuGet:

dotnet add package NocturnalGroup.SimpleEndpoints

Usage

A complete, but short, walkthrough of SimpleEndpoints can be found here.

Quickstart

var builder = WebApplication.CreateBuilder(args);
var app = builder.Build();
app.MapGet<GreetEndpoint, GreetParameters>("/");
app.Run();

public readonly struct GreetParameters
{
  [FromQuery("name")]
  public string Name { get; init; }
}

public readonly struct GreetEndpoint : ISimpleEndpoint<GreetParameters>
{
  public GreetEndpoint()
  {
  }

  public Task<IResult> HandleRequestAsync(GreetParameters parameters)
  {
    return Task.FromResult(Results.Ok($"Hello, {parameters.Name}!"));
  }
}

Versioning

SimpleEndpoints follows the SemVer versioning scheme.

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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net8.0

    • No dependencies.
  • net9.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.0-preview.3 36 2/12/2025
1.0.0-preview.2 35 2/9/2025
1.0.0-preview.1 32 1/19/2025