DJT.Vertical 8.0.0

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

// Install DJT.Vertical as a Cake Tool
#tool nuget:?package=DJT.Vertical&version=8.0.0

DJT.Vertical

Vertical Slice architecture for Web APIs is an alternative to using controllers.

Using components

In your web application, include using DJT.Vertical.Http and call the following:


builder.Services.AddVerticalComponents();

var app = builder.Build();

app.UseVerticalComponents();

Request Handlers

Use the IRequestHandler<> interfaces to define the functionality of the API, using dependency injection for dependencies. I.e.

public class GetEmployeesHandler(MyDbContext db) : IRequestHandler<IEnumerably<Employees>>
{
	public IEnumerable<Employees> Execute()
	{
		return db.Employees.ToList();
	}
}

Exceptions

To return erroneous responses, use the included Exceptions, such as BadRequestException for a HTTP 400 response.

Custom response codes can be supplied using CustomStatusException.

Auth Service

A simple auth service for getting user claim information is included.

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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net8.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
8.3.1 97 3/25/2024
8.3.0 112 3/18/2024
8.2.0 99 3/9/2024
8.0.0 100 2/18/2024